First one-time build the 2011.qvd by loading the old_data.csv with a WHERE.
LOAD * FROM old_data.csv WHERE year(DateField) = 2011;
STORE Trans INTO Trans_2011.qvd (qvd);
Then one-time get the 2012 data from old_data into a seperate csv:
LOAD * FROM old_data.csv WHERE year(DateField) = 2012;
STORE Trans INTO transactions-2012.csv (txt);
Now your daily run looks like this.
LET vYear = year(today(1));
BUFFER LOAD *
STORE Trans INTO Trans_$(vYear).qvd (qvd);
Note above is not complete FROM syntax, but hopefully close enough to make the point.
Hi there, your answer really helped me a lot. Thanks a lot man!
Now, another question rises for me.
Is there a limit on the minimun number of records that a qvd must include?
In other words, should i consider creating qvds at how many records?
50.000, 100.000, 500.000?
Or is the size of the files more important than the number of records?