Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Archie

How about something like this ?

If NoOfRows('Project_Labor') > 0 Then

trace OK;

else

trace Bad;

store rubbish into rubbish;

end if

;

Best Regards,     Bill,    

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Archie

How about something like this ?

If NoOfRows('Project_Labor') > 0 Then

trace OK;

else

trace Bad;

store rubbish into rubbish;

end if

;

Best Regards,     Bill,    

Not applicable
Author

Great, thanks for the quick response.

That actually did the trick