Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Marcio_Campestrini
Specialist
Specialist

Creating multiple QVD files based on a SQL Query

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!!

Márcio Rodrigo Campestrini
1 Solution

Accepted Solutions
luis_pimentel
Partner - Creator III
Partner - Creator III

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)

View solution in original post

1 Reply
luis_pimentel
Partner - Creator III
Partner - Creator III

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)