Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have generated yearly QVDs based on the year field present in the file.
Now, i have to store the QVDs prior to 2013 into an archive folder and the QVDs after 2013 in the current folder.
I have used the below code for generating yearly QVDs
temp:
load min(Year) as MinY,
max(Year) as MaxY
resident tab;
let MI= peek('MinY', 0 , 'temp');
let MA= peek('MaxY' , 0, 'temp');
for i= $(MI) to $(MA)
tabtemp:
noconcatenate
load * resident tab where Year=$(i);
store * from tabtemp into ../../Abc_$(i).qvd(qvd)
drop table tabtemp;
How do i modify the above code so that it stores the QVDs prior to 2013 in Archvie folder and the QVDs genertaed after 2013 in another folder.
Thanks Marcus!!! I made a slight change in the code too...
Instead of using if i>=(year(today())-3) , i stored year(today()-3) in a variable var and in the if statement , i used if $(i)>=$(var)