<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to drop all tables with exclusions. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311273#M618560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently performing a binary load on the governance dashboard and there are some unwanted tables that impact performance. The problem is that some tables in PROD governance don't exist in DEV or QA governance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to drop all tables except for a chosen few tables? I have tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/122919"&gt;Drop All Tables Except&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't drop &lt;STRONG&gt;all &lt;/STRONG&gt;tables. It drops about half of the tables. The same goes for the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14930723943549684 jive_text_macro" jivemacro_uid="_14930723943549684"&gt;
&lt;P&gt;SET vexemptList= 'SessionTaskAuditMaster Governance_AD_Link AD_USERS Profit_Centers PC_LOB';&lt;/P&gt;
&lt;P&gt;LET vNoofTables = NoOfTables();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For vTableNo = 0 to vNoofTables-1 ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //When one table get deleted the next in line get that number.So always delete first table in the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //For example if there is 4 tables and loop already finished 2 times there will not be any value for TableName(3)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vTableName = TableName(0) ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let vIndex = Index('$(vexemptList)','$(vTableName)') ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If $(vIndex)=0&amp;nbsp; then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP Table $(vTableName);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ENDIF&lt;/P&gt;
&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;NEXT&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It only drops some and not all of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to drop &lt;STRONG&gt;all&lt;/STRONG&gt; tables with exclusions? Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Apr 2017 22:20:58 GMT</pubDate>
    <dc:creator>QlikToFindOut</dc:creator>
    <dc:date>2017-04-24T22:20:58Z</dc:date>
    <item>
      <title>How to drop all tables with exclusions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311273#M618560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently performing a binary load on the governance dashboard and there are some unwanted tables that impact performance. The problem is that some tables in PROD governance don't exist in DEV or QA governance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to drop all tables except for a chosen few tables? I have tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/122919"&gt;Drop All Tables Except&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't drop &lt;STRONG&gt;all &lt;/STRONG&gt;tables. It drops about half of the tables. The same goes for the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14930723943549684 jive_text_macro" jivemacro_uid="_14930723943549684"&gt;
&lt;P&gt;SET vexemptList= 'SessionTaskAuditMaster Governance_AD_Link AD_USERS Profit_Centers PC_LOB';&lt;/P&gt;
&lt;P&gt;LET vNoofTables = NoOfTables();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For vTableNo = 0 to vNoofTables-1 ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //When one table get deleted the next in line get that number.So always delete first table in the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //For example if there is 4 tables and loop already finished 2 times there will not be any value for TableName(3)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; vTableName = TableName(0) ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let vIndex = Index('$(vexemptList)','$(vTableName)') ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If $(vIndex)=0&amp;nbsp; then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP Table $(vTableName);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ENDIF&lt;/P&gt;
&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;NEXT&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It only drops some and not all of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to drop &lt;STRONG&gt;all&lt;/STRONG&gt; tables with exclusions? Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 22:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311273#M618560</guid>
      <dc:creator>QlikToFindOut</dc:creator>
      <dc:date>2017-04-24T22:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop all tables with exclusions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311274#M618561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could speculate, but the best way to debug this kind of problem is to look at the script log to see what's happening. If you can't figure out what the problem is from the log, please post the relevant portion of the log here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, when I do this kind of processing I usually walk the tables backwards, avoiding the changing index problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;For &lt;SPAN style="color: #ff0000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;vTableNo&lt;/SPAN&gt; = &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;vNoofTables-1&lt;/SPAN&gt; to 0 step -1&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f8f8f8;"&gt;&lt;SPAN class="attribute" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: red;"&gt;vTableName&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; = TableName(&lt;SPAN style="color: #ff0000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f8f8f8;"&gt;vTableNo&lt;/SPAN&gt;) ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #f8f8f8; font-family: Consolas, 'Courier New', Courier, mono, serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 23:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311274#M618561</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-04-24T23:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to drop all tables with exclusions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311275#M618562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working the table backwards solved my problem, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 12:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-drop-all-tables-with-exclusions/m-p/1311275#M618562</guid>
      <dc:creator>QlikToFindOut</dc:creator>
      <dc:date>2017-04-25T12:41:39Z</dc:date>
    </item>
  </channel>
</rss>

