11 Replies Latest reply: Jul 30, 2018 11:38 AM by Mario Centeno RSS

    Incremental load with a do while

    Mario Centeno

      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');    


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

      c.pngciclo 2.png