Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional reload

Hi,

This is the case. I need to do conditional reload. I have a table with last source database update date. This is one row table. i need the script to compare two dates - todays date and last database update date. If todays date =last update date i want the script to reload data, if not I want to exit script and save the appliaction with old data.

Any ideas?

10 Replies
Anonymous
Not applicable
Author

Michael,

I worked it out.

instead of an exit script I just place a LOAD statement which references an unknown table.  This causes an error which stops the reload without saving changes.

Cheers,

John.

-------------

LOAD

          ROWCounted;

SQL SELECT COUNT(*) AS ROWCounted

  FROM [HealthCentral].[dbo].[WaitingListHistory];

LET vRowCount =   peek('ROWCounted',0);

IF $(vRowCount) < 44000000 THEN

     LOAD x RESIDENT y;

END IF