2 Replies Latest reply: Nov 8, 2013 3:24 PM by Archie Williams RSS

    Fail a scheduled reload if no records returned.

      Hi,

       

      I would like to know if there is anything we can do to fail a reload in case of zero records in the table(Project_Labor) that was reloaded.

       

      Here is what I have in my script:

       

      If Alt(NoOfRows('Project_Labor'), 0) > 0 Then 

       

      STORE Project_Labor into \\nwd2qvdev1\e$\Qlikview\Source Documents\Sample Folder\Project_Labor.qvd;

       

      //ABC is non-existent column in table. I am using this to intentionally fail my reload in case of no records in my table 

      ELSE Load ABC from Project_Labor;

       

      End if;

       

       

      The problem with the above code is that the reload doesn't work even when the condition is true i.e. there are greater than "0" records returned.

       

      Any help would be appreciated!

       

      Thanks in advance.

       

      Archie