Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community Members,
Is it always necessary drop< table>, if we are using resident table?
SUB WildcardDropTables (vExpression)
// Loop through the tables within the model
FOR i = 0 TO noOfTables()-1 STEP 1
// Get the current table name
LET vCurrTable = tablename(i); // Get the current table name
// If the table name matches the pattern then drop it
IF wildmatch('$(vCurrTable)','$(vExpression)') THEN
DROP Table [$(vCurrTable)];
LET i = i - 1; // Needed as table index reduces once table is dropped
END IF
NEXT
// Clear the variables so they don't persist
LET vExpression = null();
LET vCurrTable = null();
END SUB