Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Only save to text file in script if data is present

Hi Experts,

I have a script that stores the contents of a table into a text file every hour with the last hours data using a where clause when I load in the data to the table.

store PAYMENT into '\\Data Team\Hourly_Deltas\PAYMENT_DELTA-'$(vDateTime).txt (txt, delimiter is ',');

This works very well, BUT, what I would like to do is to only store the table as a text if there is data there, is there a way to do this?

So, sometimes there is no data and I get a text file with just field headers in it, I only want the text files if there is data as well as field headers.

Thank you for your help, Simon

1 Solution

Accepted Solutions
marcus_sommer

Maybe something like this:

if noofrows('PAYMENT') >= 1 then

     store ....

end if

- Marcus

View solution in original post

2 Replies
marcus_sommer

Maybe something like this:

if noofrows('PAYMENT') >= 1 then

     store ....

end if

- Marcus

Not applicable
Author

Thank you very much marcus_sommer