Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
MarioCenteno
Creator III
Creator III

Incremental load with a do while

Hello everyone, I have the following challenge I need to process the data and load it with each day and keep it in the same table, for that I am using a do while in another post I have helped do it


I thank you sincerely for your kind help


Current script

vDate = Date(Date#('20180701','YYYYMMDD'),'YYYYMMDD');    

DO WHILE vDate <= Today(1)   

  /* TRACE */ SELECT * FROM TABLE WHERE DATE = TO_DATE('$(vDate)','YYYYMMDD');    

  LET vDate = Date( vDate+1 ,'YYYYMMDD');   

LOOP

With this script it is loading the sales of 52 clients, but in reality they are approximately 10K of clients

c.pngciclo 2.png

11 Replies
MarioCenteno
Creator III
Creator III
Author

Well, in the structure I have, I am not saving the data in a QVD, but I would like to have an incremental load where only new data will be loaded and update the records that have undergone changes in the database.


You could help me with the script to leave it in that incremental way.

sunny_talwar

Can you give an example of what you mean? I am not sure I follow the requirement clearly...