Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error In Script?

Hi All,

QVD's are not being generated for few tables with the below script.

Ex: I have following tables

Table_2014,

Table_2014_1,

Table_2015_2,

Table_2015_6 ..of these.. only few tables are getting stored to qvd's sometimes the 1st and 3rd gets loaded, and sometimes 2nd and 3rd table, but not all the tables.

this is wat i have written....

FOR i=0 to NoOfTables()-1

LET vTabName=TableName(0);

STORE [$(vTabName)] into \\QVDpath\$(vTabName).qvd (qvd);

DROP Table [$(vTabName)];

NEXT i

Is there any problem with tables naming convention...

John

17 Replies
jonas_rezende
Specialist
Specialist

johnlewis

What is the error message?

Anonymous
Not applicable
Author

error in store command...

jonas_rezende
Specialist
Specialist

Please, post your  QVDPath as initialized variable, including, just like the line STORE and INTO.

sasiparupudi1
Master III
Master III

your problem is with the drop table statement which is altering the count of NoOfTables() after each drop so your vTabname is getting null value in the loop

FOR i=0 to NoOfTables()-1

LET vTabName=TableName($(i));

STORE [$(vTabName)] into \\QVDpath\$(vTabName).qvd (qvd);

DROP Table [$(vTabName)];-----> remove it

NEXT i

HTH

Sasi

sasiparupudi1
Master III
Master III

you could use the following script for dropping the tables

   do while NoofTables()>0

     LET vTabName = TableName(0);

     DROP TABLE $(vTabName);

    

     loop;

sasiparupudi1
Master III
Master III

Hi

Have you managed to solve your problem?

Sasi

qlikviewwizard
Master II
Master II

‌hi ,

please select the correct, helpful answers and close the thread.

thank you.

Anonymous
Not applicable
Author

Thanks Sasi, appreciate your suggestions and thanks qlik community for bringing wonderful people on to single platform.