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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
HonestToad
Partner - Contributor II
Partner - Contributor II

Store all tables as QVD

I am trying to store all my Qlik tables using a loop, however I would like all tables with "Journal" in the title to be stored in a different location.  This is my currently code:


Set vPathQVD='lib://CCure2QlikExport/QVD_Files';

for i=0 to NoOfTables() -1
let vTableName= TableName(i);
If WildMatch([$(vTableName)],'*Journal*') = 0 then
store [$(vTableName)] into [$(vPathQVD)/journal/$(vTableName).qvd] (qvd);
else
store [$(vTableName)] into [$(vPathQVD)/$(vTableName).qvd] (qvd);
endif;
Next;

 

Unfortunately all tables are getting stored as non-journals - I think its because I am using the $(vTableName) variable incorrectly?

Labels (1)
1 Solution

Accepted Solutions
Nicole-Smith

Try this: 

Set vPathQVD='lib://CCure2QlikExport/QVD_Files';

for i=0 to NoOfTables() -1
let vTableName= TableName(i);
If WildMatch('$(vTableName)','*Journal*') = 0 then
store [$(vTableName)] into [$(vPathQVD)/journal/$(vTableName).qvd] (qvd);
else
store [$(vTableName)] into [$(vPathQVD)/$(vTableName).qvd] (qvd);
endif;
Next;

View solution in original post

3 Replies
Nicole-Smith

Try this: 

Set vPathQVD='lib://CCure2QlikExport/QVD_Files';

for i=0 to NoOfTables() -1
let vTableName= TableName(i);
If WildMatch('$(vTableName)','*Journal*') = 0 then
store [$(vTableName)] into [$(vPathQVD)/journal/$(vTableName).qvd] (qvd);
else
store [$(vTableName)] into [$(vPathQVD)/$(vTableName).qvd] (qvd);
endif;
Next;

andoryuu
Creator III
Creator III

Set
If WildMatch([$(vTableName)],'*Journal*') = 0 then
to
If WildMatch('$(vTableName)','*Journal*') = 0 then
marksouzacosta

Hi,

We just released a new video in our YouTube channel that may help others looking for some extra info on how to create QVDs. I hope it helps!

IPC Global Tips #6 - Creating QVDs - Regular and Incremental Loads
https://youtu.be/S9L6vWItchs

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com