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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
tyagishaila
Specialist
Specialist

Drop Table

Hi Community Members,

Is it always necessary drop< table>, if we are using resident table?

10 Replies
Not applicable

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