2 Replies Latest reply: Sep 26, 2016 4:53 PM by Court van de Lisdonk RSS

    Drop aTable when a  flag is zero

    Court van de Lisdonk


      I hope someone can help me, there are many files and tables in my document. So I have made an excelfile where the tables or filenames which I want to delete get the flag 0 (Zero).  I made a little script, it runs but the table is not deleted/dropped.


      for Testing I have one table in my excelfile with flag 0 called SalesInvoice,



      Load ExcelFile DropTablesFields

      if Flag = 0 then Drop Table


      A  as TableName,
      B  as Flag
      [D:\QlikView Development\PacoliManagement\datasources\excel\DropTables.xlsx]
      (ooxml, no labels, header is 1 lines, table is Tabelle1);
      // where [B] = 0;
      IF [B] = 0 THEN
         Set vTableName = A;
         DROP Table $( vTableName);
           DROP TABLE A;


      Perhaps someone can tell where my thinking went wrong.

      I'm also open for a control if the table I want to drop, exists in my document.