Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to implement the incremental load in my app to insert the records every day based on maximum date.
initially i need to load only 01-jan-21 to 19-May-21 and store into qvd,then i will use maximum date from stored qvd and it has 19-May21.then i will store the value into variable and next time whenever i run will use this variable for inserting records from20-May21 to 01-jan-21 to 19-May-21 qvd using concatenate.
Probelm:As i mentioned my source has data from 2015 to2021 may.so i need to write the filter in sql query load data from
01-jan-21 to 19-May-21 ,i have tried below but it is not working.
LET vMaxDate1 = date(peek('Maxdate'),'DD-MMM-YY');(19-May-21)
let YTD= date(yearstart(today()),'DD-MMM-YY');
source:
select * from table
Where To_Char(LST_UPDT_TS, 'DD-MON-YY') >='>=date(yearstart(today()),'DD-MMM-YY') <=$(vMaxDate1)'
/*'>=$(YTD) <=$(vMaxDate1)'
Hi HarishM07
I think, you are connecting oracle database, if so, try like below
Where To_Char(LST_UPDT_TS, 'DD-MON-YY') BETWEEN date '$(YTD)' AND date '$(vMaxDate1)'
ref: https://www.oracletutorial.com/oracle-date-functions/oracle-to_char/
Hi HarishM07
I think, you are connecting oracle database, if so, try like below
Where To_Char(LST_UPDT_TS, 'DD-MON-YY') BETWEEN date '$(YTD)' AND date '$(vMaxDate1)'
ref: https://www.oracletutorial.com/oracle-date-functions/oracle-to_char/