Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have a SQL query that brings a field called "Year" with multiple values (for example, 2012, 2013, 2014). I would to generate various QVD files, one for each year. Does anyone have any examples of how to do this?
Thanks in advance!!
Try something like:
FOR vYear=2012 TO 2014
TempTable:
LOAD * FROM yourtable WHERE Year = vYear;
STORE TempTable INTO '$(vYear)'.qvd (qvd);
NEXT;
Update: Not sure if in the WHERE clausule you nedd Year = vYear or Year = $(vYear)
Try something like:
FOR vYear=2012 TO 2014
TempTable:
LOAD * FROM yourtable WHERE Year = vYear;
STORE TempTable INTO '$(vYear)'.qvd (qvd);
NEXT;
Update: Not sure if in the WHERE clausule you nedd Year = vYear or Year = $(vYear)