i want to reload last two months data from QVD, need to mention a condition at QVD path
by using resident load it is working please suggest me how to resolve this.
my date format is YYYYMMDD.
'' as AWTaxGL
the problem is that you're going to query all qvd's then...
i'd try to generate all dates that you need to load (in a sort of calendar table)
and using a loop to peek every date value, store it as variable, load qvd, next date, etc
probably something like this...
let vMinDate = num(today()-60);
let vMaxDate = num(today());
date($(vMinDate)+iterno()-1,'YYYYMMDD') as tempDate
while $(vMinDate)+iterno()-1<=$(vMaxDate) ;
let vNumberOfDates = noofrows('tempCalendar')-1;
for i = 0 to $(vNumberOfDates)
let vDate = peek('tempDate',$(i),'tempCalendar');
Hi, that's telling you that there is no qvd for that particular date, do you have a qvd for every day? If yes, check the path and qvd names.
You can add a check to confirm if a file exists before loading it:
IF IsNull(QvdCreateTime('$(vQVDfolder)/AdjustmentWaiver/AdjustmentWaiver$(vDate).qvd'))=0 THEN Adj_Temp: LOAD.. ENDIF
BTW @mikaelsc answer is a good one, but I think it can be simplified to:
FOR i = 0 to 60 // or 59 LET vDate = date(Today()-$(i),'YYYYMMDD'); IF IsNull(QvdCreateTime('$(vQVDfolder)/AdjustmentWaiver/AdjustmentWaiver_$(vDate).qvd'))=0 THEN Adj_Temp: Load * FROM [$(vQVDfolder)/AdjustmentWaiver/AdjustmentWaiver_$(vDate).qvd](qvd); ENDIF NEXT i