Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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 (2)
1 Solution

Accepted Solutions
Highlighted

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
Highlighted

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

Highlighted
Creator III
Creator III

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

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