Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This last step which exports tables to qvds always gives me an error.
For i=0 to NoOfTables()-1
let d=TableName(i);
Drop Table [$(d)] ;
Next;
why is it that? What am I doing wrong?
Yes, after the sub-routine but not with the drop-statement else by calling the routine with something like:
CALL WildcardDropTables ('*-temp')
and you may adjust the routine - removing the wildcard-part or extending it to make the parameter optional or you just adapt the index-adjustments into your origin approach.
- Marcus
Each creation or dropping of a table will change the table-index - therefore the loop must run backwards or you need to adjust the loop-counter. I think the following will be helpful for you:
https://www.qlikviewaddict.com/2014/06/dropping-tables-using-wildcard.html
- Marcus
Marcus, I will try this code.
If It doesn't work I will come back with my questions. 😄
Thanks once more,
Ioanna
Hey Marcus,
do you know if should , after the sub routine, add the DROP TABLES "*-temp"; statement?
Yes, after the sub-routine but not with the drop-statement else by calling the routine with something like:
CALL WildcardDropTables ('*-temp')
and you may adjust the routine - removing the wildcard-part or extending it to make the parameter optional or you just adapt the index-adjustments into your origin approach.
- Marcus
It seems to be working 🙂 Thanks!