Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

store qvd script routine , except for one table

Hi all, 

I normally do this routine to export tables to qvds:

For i=0 to NoOfTables()-1
let d=TableName(i);
Store [$(d)] into [$(vPathQVD)/$(d)].qvd;
Next;

Let vLoadComplete = Now();FOR i = 0 TO noOfTables()-1 STEP 1
LET vCurrTable = tablename(0); // Get the current table name
DROP Table [$(vCurrTable)];
NEXT;

LET vCurrTable = null();

 

But now in one qvd I have a do while loop routine with a STORE qvd execution in this loop.

What to do so as for it not to be taken into account to the final exportation routine i pasted above?

 

3 Replies
Or
MVP
MVP

Should be something along the lines of

LET vCurrTable = tablename(0); // Get the current table name

IF vCurrTable <> 'TableNameToKeep'

THEN

DROP Table [$(vCurrTable)];

END IF


NEXT;

ioannagr
Creator III
Creator III
Author

FOR i = 0 TO noOfTables()-1 STEP 1
LET vCurrTable = tablename(0); 
IF vCurrTable <> 'Size'
then
DROP Table [$(vCurrTable)];
END IF;
NEXT;

LET vCurrTable = null();

 

 

@Or hi, trying this and a red-ish area comes up to DROP and END, not like an error red, more like a red hue!

What am i doing wrong 🤔

ioannagr
Creator III
Creator III
Author

eeeeeeer, it was a syntax error, "THEN" needed to be on the same line as "IF" ... crazy!