<?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 drop tables in a FOR loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354424#M706376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no one response?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2012 23:44:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-15T23:44:28Z</dc:date>
    <item>
      <title>drop tables in a FOR loop</title>
      <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354423#M706375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp; meet a&amp;nbsp; wried&amp;nbsp; issue, actually it is based on a wried requirement. Below is the steps to reproduce the issue I met.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. create 2 tables in SQL Server, you can also use oracle, etc.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;CREATE TABLE [ETL_Log (&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[logid] [int] NULL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;GO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;CREATE TABLE ETL_WorkFlow (&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[WorkFlowID] [int] NULL ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[JobID] [int] NULL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;GO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Both these 2 tables are empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. create a new qvw file, edit script, create OLE DB connection, and then add below code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;for i=1 to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SQL insert into etl_log values (1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SQL Select * from ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DROP Table ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Try to reload data, you will get an exception that "table not found" . Try debug this script, this issue will happen when i &amp;gt;= 2&lt;/P&gt;&lt;P&gt;After that, you can easily find that ETL_Log table has 3 records, means "&lt;SPAN style="color: #3366ff;"&gt;SQL insert ...&lt;/SPAN&gt;" works fine.&lt;/P&gt;&lt;P&gt;But, if comment out the "&lt;SPAN style="color: #3366ff;"&gt;SQL insert ...&lt;/SPAN&gt;" line, everything works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I researched this issue again, and then I found that "&lt;SPAN style="color: #3366ff;"&gt;SQL insert ...&lt;/SPAN&gt;" is not recognized as an Insert SQL. In "script execution progress" window, it shows that :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ETL_WorkFlow 0 lines fetched&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into etl_log values (1) 0 lines fetched&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into etl_log values (1) &amp;lt;&amp;lt; ETL_WorkFlow 0 lines fetched&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into etl_log values (1) &amp;lt;&amp;lt; insert into etl_log values (1) 0 lines fetched&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;insert into etl_log values (1) &amp;lt;&amp;lt; ETL_WorkFlow 0 lines fetched&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Means, when i&amp;gt;=2, QlikView recognize SQL insert as a query for table "ETL_WorkFlow", and then it tried to fetch value into "ETL_WorkFlow".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, try CTRL+T, you will see the tables like the screen-shot I attached here.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/12170_1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Very wried, can someone explain why this happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, if I add "NoConcatenate" before "SQL select ...", this exception will not happen. But the wried table like above screen-shot will still be there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 15:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354423#M706375</guid>
      <dc:creator />
      <dc:date>2012-03-15T15:19:33Z</dc:date>
    </item>
    <item>
      <title>drop tables in a FOR loop</title>
      <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354424#M706376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no one response?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 23:44:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354424#M706376</guid>
      <dc:creator />
      <dc:date>2012-03-15T23:44:28Z</dc:date>
    </item>
    <item>
      <title>drop tables in a FOR loop</title>
      <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354425#M706377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are relying on default table names and that may be the problem. Try adding some explicit table labels like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i=1 to 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LogValues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL insert into etl_log values (1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table LogValues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ETL_Workflow: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL Select * from ETL_WorkFlow;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table ETL_WorkFlow;&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 02:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354425#M706377</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-03-16T02:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: drop tables in a FOR loop</title>
      <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354426#M706378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check with this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #3366ff;"&gt;for i=1 to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL insert into etl_log values (1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETL_WorkFlow:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL Select * from ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; color: #3366ff;"&gt;NEXT i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 04:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354426#M706378</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-16T04:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: drop tables in a FOR loop</title>
      <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354427#M706379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for your reply, I have tried both your solution, not workable.&lt;/P&gt;&lt;P&gt;Rob&amp;gt;&amp;gt; "DROP Table LogValues" will trhow exception because when i=1, this table doesn't exist. This table will only be created when i&amp;gt;=2. But this give me some idea, I will try&lt;SPAN style="color: #3366ff;"&gt; IF not isnull(nooftables('LogVales')) then drop table&lt;/SPAN&gt; later, maybe that can drop the log table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried another way to avoid exception:&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;for i=1 to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL insert into etl_log values (1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETL_WorkFlow$(i):&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Noconcatenate &lt;/STRONG&gt;SQL Select * from ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table ETL_WorkFlow&lt;STRONG&gt;$(i)&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By this way, there has no exception.&lt;/P&gt;&lt;P&gt;But, the table named as "SQL insert into etl_log values (1)" is still there when input ctrl+T.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I researched this issue again, seems this is caused by "QlikView recognize SQL insert as a SQL Select command", so after execution, it tried to fetch values into some table. &lt;/P&gt;&lt;P&gt;But, since this is an insert command, so no ResultSet return, of course no column can be find. And then, it will auto concatenate with previously table/fields. That's the reason why there exist a wried table, whose column names belong to ETL_WorkFlow , and table name belong to SQL insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if anyone tried to use INSERT/UPDATE/DELETE in load script at before, I think this is an general issue, and QV should have some workaround.&lt;/P&gt;&lt;P&gt;BTW, does any one have good idea to catch exception? I know ScriptErrorCount can be used to identify if exception happened, but what I want is syntax like JAVA/Oracle. E.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Java:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;try{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int a;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a=1/0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;catch (exception e) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(e.getmessage());&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;Oracle:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Begin&lt;/P&gt;&lt;P&gt;a:=1/0;&lt;/P&gt;&lt;P&gt;exception&lt;/P&gt;&lt;P&gt;when others then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbms_output.putline('div 0 exception');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 05:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354427#M706379</guid>
      <dc:creator />
      <dc:date>2012-03-16T05:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: drop tables in a FOR loop</title>
      <link>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354428#M706380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Resolved.&lt;/P&gt;&lt;P&gt;Below is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;for i=1 to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sql_insert:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL insert into etl_log values (1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;STRONG style="color: #3366ff; font-size: 12px; background-position: initial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if NOT ISNULL(TableNumber('sql_insert')) then&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;STRONG style="color: #3366ff; font-size: 12px; background-position: initial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop table sql_insert;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;STRONG style="color: #3366ff; font-size: 12px; background-position: initial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETL_WorkFlow:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&lt;STRONG style="background-position: initial; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;SQL Select * from ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table ETL_WorkFlow;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-position: initial;"&gt;&lt;SPAN style="background-position: initial; font-size: 12px; color: #3366ff;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The root cause of this issue is : QlikView recognize "&lt;SPAN style="color: #3366ff;"&gt;SQL insert into etl_log values (1);&lt;/SPAN&gt;" as a query command, so it tried to fetch resultset into a table. &lt;/P&gt;&lt;P&gt;But, since this sql will not return any resultset, so "concatenate" happen, it auto concatenate with etl_workflow in the 2nd round. That's the reason why this issue will only happen when i&amp;gt;=2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if this is the best solution, for me, at least it is a useful workaround, hope it will be helpful for you too &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 02:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/drop-tables-in-a-FOR-loop/m-p/354428#M706380</guid>
      <dc:creator />
      <dc:date>2012-03-20T02:57:05Z</dc:date>
    </item>
  </channel>
</rss>

