Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have a couple of QVDs that i need converted into CSV files, but not sure how to grab them all at once
Load your table into a Qlik resident table, then use the FOR EACH loop with a FieldValueList, something like
TMP:
LOAD A FROM FileList.xlsx (...);
FOR EACH vFile in FieldValueList( A )
...
NEXT vFile
DROP TABLE TMP;
Try this - obviously youll need to substitute some actual names and locations.
[TableName]:
Load
*
From [QVD LOCATION];
Store [TableName] into [FileLocation/filename.csv](txt);
Drop table [FileName];
You can use a FOR EACH ... NEXT loop to iterate the above script over all available QVDs, see
Thanks this is great , the list of QVDs names that I need to grab is an excel doc, like this:
and that is where my issue is , i need to pick up just those QVDs from a folder of 100000 QVDs. Could you please point me to the right direction ?
Load your table into a Qlik resident table, then use the FOR EACH loop with a FieldValueList, something like
TMP:
LOAD A FROM FileList.xlsx (...);
FOR EACH vFile in FieldValueList( A )
...
NEXT vFile
DROP TABLE TMP;
Thanks,
I think that i am Close now but still not working,
here is my code, what am i doing wrong?
What do you get when you run the code? An error? If your file name contain spaces, you need to quote the file name in the FROM and STORE statements.
And it may be better to use a TMP table and DROP it in each iteration.
Something like
FOR each vFile in FieldValueList(TargetQVDs)
TRACE File = $(vFile);
TMP:
LOAD * FROM [$(QVDRoot)\$(vFile).qvd] (qvd);
STORE TMP into [$(QVDRoot)\$(vFile).csv] (txt, delimiter is '|');
DROP TABLE TMP;
NEXT vFile
Hey do i have to define the vFile variable?
Still Not working BTW , I am losing Hope lol
Please describe a bit more detailed what you mean with 'not working'.
Check that the loop is performed, each file name should be printed out using the TRACE statement.
Are the TMP tables loaded?
Are the csv files created?
Just stating 'doesn't work' is not helping us to help you.