<?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 Re: Drop all Tables except in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/28522#M1937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Christian,&lt;/P&gt;&lt;P&gt;What is your issue with drop table statement?&lt;/P&gt;&lt;P&gt;I had a problem wit it too, but I resolved. My problem was that at the end of the script not all table were dropped.&lt;/P&gt;&lt;P&gt;After tests and retest, I undertood that, during dropping, the 'TableNumber' of existing table change!! So, if for example the number of "TableX" at the beginning is 15, during dropping can change in 10, 5,0...and when the n of your FOR is 15, the function "tablename(15)" is null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I revolved using a different approach...not a cycle, but a long string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfTables()-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; TableList:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD TableName($(i)) as Tablename AUTOGENERATE 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; WHERE not WildMatch(TableName($(i)), 'TableA','&lt;SPAN style="font-size: 13.3333px;"&gt;TableB&lt;/SPAN&gt;','&lt;SPAN style="font-size: 13.3333px;"&gt;TableC&lt;/SPAN&gt;');&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableList1:&lt;/P&gt;&lt;P&gt;load concat(Tablename, ',') as Tablename1&lt;/P&gt;&lt;P&gt;resident TableList;&lt;/P&gt;&lt;P&gt;let vdrop= peek('Tablename1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Tables TableList,TableList1;&lt;/P&gt;&lt;P&gt;DROP Tables $(vdrop);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this can help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2018 13:21:38 GMT</pubDate>
    <dc:creator>graziellas82</dc:creator>
    <dc:date>2018-04-16T13:21:38Z</dc:date>
    <item>
      <title>Drop all Tables except</title>
      <link>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/28521#M1936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a way to drop all existing tables in my datamodel, except some Tables which can be stated in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found in the Community two solutions, which I tried and it definitely does not work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&lt;A __default_attr="1275" __jive_macro_name="idea" class="jive_macro jive_macro_idea" data-orig-content="Drop Tables *;" href="https://community.qlik.com/"&gt;&lt;/A&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;Anybody has a workable solution for this case?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx a lot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 09:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/28521#M1936</guid>
      <dc:creator>chriys1337</dc:creator>
      <dc:date>2018-02-15T09:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Drop all Tables except</title>
      <link>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/28522#M1937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Christian,&lt;/P&gt;&lt;P&gt;What is your issue with drop table statement?&lt;/P&gt;&lt;P&gt;I had a problem wit it too, but I resolved. My problem was that at the end of the script not all table were dropped.&lt;/P&gt;&lt;P&gt;After tests and retest, I undertood that, during dropping, the 'TableNumber' of existing table change!! So, if for example the number of "TableX" at the beginning is 15, during dropping can change in 10, 5,0...and when the n of your FOR is 15, the function "tablename(15)" is null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I revolved using a different approach...not a cycle, but a long string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfTables()-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; TableList:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD TableName($(i)) as Tablename AUTOGENERATE 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; WHERE not WildMatch(TableName($(i)), 'TableA','&lt;SPAN style="font-size: 13.3333px;"&gt;TableB&lt;/SPAN&gt;','&lt;SPAN style="font-size: 13.3333px;"&gt;TableC&lt;/SPAN&gt;');&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableList1:&lt;/P&gt;&lt;P&gt;load concat(Tablename, ',') as Tablename1&lt;/P&gt;&lt;P&gt;resident TableList;&lt;/P&gt;&lt;P&gt;let vdrop= peek('Tablename1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Tables TableList,TableList1;&lt;/P&gt;&lt;P&gt;DROP Tables $(vdrop);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this can help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 13:21:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/28522#M1937</guid>
      <dc:creator>graziellas82</dc:creator>
      <dc:date>2018-04-16T13:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Drop all Tables except</title>
      <link>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/1576067#M41974</link>
      <description>&lt;P&gt;Very nice and useful code,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/44211"&gt;@graziellas82&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;I would like to suggest a little improvement:&lt;/P&gt;&lt;P&gt;Using '['&amp;amp;CONCAT(TABLENAME,'],[')&amp;amp;']' AS TABLENAME1 instead gives support for tables with space on it names.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 17:46:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Drop-all-Tables-except/m-p/1576067#M41974</guid>
      <dc:creator>carahyba</dc:creator>
      <dc:date>2019-05-02T17:46:44Z</dc:date>
    </item>
  </channel>
</rss>

