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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dhivya_Prakash
Contributor
Contributor

Loop statement for loading data

Hi All, 

Hope you are doing good!

I have a scenario for which I need your suggestion.
One of our application query loads data bi-monthly which fetches 26 months of data every time it refreshes. Due to high volume of data it is difficult to trace which bi-monthly period it is loading currently and the volume of data it is currently loaded.
Request your help in understanding the syntax used to create this looping structure. i want the final output of the entire 26months to be stored in a QVD file. 

Thanks for your help in advance.

Regards,
Dhivya

1 Reply
Sammy_AK
Creator II
Creator II

  1. First, get the maximum date from the main QVD (already exists and complied earlier, lets say Main.QVD) and set this max date to a variable.
  2. Now load the data from the source with a where condition greater than the variable (i.e. you will load only data greater than which exists earlier)
  3. this above step will fetch you only the values which do not exist in the earlier complied QVD  (lets say New.QVD)
  4. Now, concatenate the Old QVD and New QVD this will fetch you only the new records and add data into an existing QVD.