This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
Discussion Board for collaboration related to QlikView App Development.
I loaded 5 tables,and now i want to create 5 qvds with single store statement and i want to drop the tables at a time.
So, i used the below code for this
FOR i =0 to NoOfTables()-1
LET vTabName =TableName($(i));
STORE $(vTabName) into $(vTabName).qvd (qvd);
DROP Table $(vTabName);
but i'm unable to create the qvd 2nd table and 4th table and i'm gettinng an error.When i start debugging loop is stepping from 1st table to 3rd table and next 5th table and next getting an error
Syntax error, missing/misplaced FROM:
STORE into .qvd (qvd)
STORE into .qvd (qvd).
Thanks in Advance
Hi Sridhar, you can use:
LET vTabName =TableName(0);
When you drop the table, the index of the other tables changes, so you always need to get the (0) table until all are droped.
View solution in original post
This works, you would need to define the table names (in my case they are 'ASCII', 'Transactions', 'Characters')
FOR Each vTable IN 'ASCII', 'Transactions', 'Characters'
STORE $(vTable) INTO $(vTable).qvd (QVD);
DROP Table $(vTable);
You can also create a subroutine and call the subroutine to store and drop the QVD.
STORE '$(vTable)' INTO QVD\$(vTable) (qvd) ;
DROP TABLE $(vTable);
Thanks Ruben Marin its working.
If you want to store multiple tables then you have store it in multiple QVD files. You can store in QVD files using like this
STORE Table1 INTO Table1.qvd;
STORE Table2 INTO Table2.qvd;
STORE Table3 INTO Table3.qvd;
STORE Tablen INTO Tablen.qvd;
Or you can use For loop to store all tables in QVDs like below
FOR vCount = 0 to NoOfTables()-1
LET vTableName = TableName($(vCount));
STORE $(vTableName ) INTO $(vTableName).qvd (qvd);
Hi, I am loading the 3 csv files and trying to store all the 3 csv files as QVD. But the script is generating one qvd file which contains the data from all the 3 csv files. What if i need individual qvd for each file.
This can be caused because your 3 loads have the same structure and is autoconcatenating. To avoid this you can use the 'NoConcatenate' clause:
LOAD... FROM csv1
NoConcatenate LOAD ... FROM csv2
Thank you. Its working file.