Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to store qvds based on each single day. I have the data In db as
Id, start, end 1, 1/1/2022, 1/30/2022
The above record was actually stored as one record in db but the record was available for 30 days. So in general I need 30 qvds with same record showing up. I was able to get the records seperated out but need help in storing the qvds using loop instead of manually doing the work.
Please provide your thoughts. Any help is highly appreciated!!
Try something like this.
set vStartDate = yearstart(today());
set vEndDate = yearstart(today(),-1);
For _date = vStartDate to vEndDate
DayData:
NoConcatenate Load '$(_date)' as Date, id From Source
Where [end]>=$(_date) and [start] <=$(_date);
Store DayData into Lib://QVD/Data_$(_date).qvd (Qvd);
Drop Table DayData;
Next _date