3 Replies Latest reply: Mar 17, 2016 11:34 AM by Rakesh Paul RSS

    Incremental Load

    Rakesh Paul

      Dear All,

       

      I am trying to implement incremental load on a transaction table where I am picking up data from ORACLE R12. I am using these part of code, and I have another piece of code where basically I am concatenating with the history table, here is the code-

      Let V_StartTime=Now();

       

       

      Let V_CYearStart=Date(YearStart(Today()),'DD-MMM-YYYY');  //Current Year Start Date

       

       

      NoConcatenate

      PA_EXPENDITURE_ITEMS_ALL_HIST:

      LOAD *

      From $(vMDRawQVDs)PA_EXPENDITURE_ITEMS_ALL.qvd (qvd);

       

       

      NoConcatenate

      LY_MaxDate:

      Load max(Date(Date#(LAST_UPDATE_DATE,'DD-MMM-YYYY'),'DD-MMM-YYYY')) AS LYearEnd Resident PA_EXPENDITURE_ITEMS_ALL_HIST;

       

       

      Let V_LYearEnd=Peek('LYearEnd',0,'LY_MaxDate');          //Last Year Start Date

      Drop Table LY_MaxDate;

       

       

      NoConcatenate

      PA_EXPENDITURE_ITEMS_ALL:

      Sql

      Select

      EXPENDITURE_ITEM_ID,

      To_Char(LAST_UPDATE_DATE,'DD-MON-YYYY') LAST_UPDATE_DATE,

      ORG_ID

      FROM

      PA_EXPENDITURE_ITEMS_ALL

      Where

      To_Char(LAST_UPDATE_DATE,'DD-MON-YYYY')>'$(V_CYearStart)';

       

      But the problem is that while I am executing these piece of code instead of taking updated data it's taking the full table. Here is a small piece of data which is residing in ORACLE system-

        

      EXPENDITURE_ITEM_IDLAST_UPDATE_DATEORG_ID
      13079/26/2011 9:14:45 PM98
      13089/29/2011 9:31:11 AM98
      13099/26/2011 9:14:45 PM98
      13109/26/2011 9:14:45 PM98
      13119/26/2011 9:14:45 PM98

      Please suggest me how can I tackle this issue.

       

      Thanks in advance!

       

      Regards,

      Rakesh Paul