<?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: Create table inside Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579695#M215472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the fields are there, they are being place in some table. The Concatenate keyword is causing it to be concatenated with the previously created table in the script, not the tmp_table. It looks to me like you can remove the Concatenate keyword in this case.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create listboxes for $Field and $Table. Click on the fieldname to find out what table it's in. &lt;/P&gt;&lt;P&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"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Feb 2014 13:04:44 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2014-02-13T13:04:44Z</dc:date>
    <item>
      <title>Create table inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579692#M215469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm noticing a behavior I cannot explain by myself. Inside my Load script I create a table on which I add a row each time a condition is matched. In particular I have two nested FOR and a IF statement inside them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;FOR i = 0 TO NoOfRows('G_L Account FINE') - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTableLtot = peek('G_L Account FINE.LTot', $(i), 'G_L Account FINE');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTableRtot = peek('G_L Account FINE.RTot', $(i), 'G_L Account FINE');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTableInd = peek('G_L Account FINE.Indentation', $(i), 'G_L Account FINE');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTableTot = peek('G_L Account FINE.Totaling', $(i), 'G_L Account FINE');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FOR j = 0 TO NoOfRows('G_L Account') - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTableNo = peek('K_No_GLAccount', $(j), 'G_L Account');&lt;/SPAN&gt;&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;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF $(vTableNo) &amp;gt;= $(vTableLtot) AND $(vTableNo) &amp;lt;= $(vTableRtot) THEN&lt;/SPAN&gt;&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;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; QUALIFY *;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; UNQUALIFY '*';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; [tmp_table]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; concatenate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vTableNo)' as K_No_GLAccount,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vTableInd)' as Indentation,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vTableTot)' as Totaling&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; autogenerate(1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&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;&amp;nbsp; //drop Table tmp_table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/SPAN&gt;&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;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NEXT j&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;NEXT i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;drop Table [tmp_table];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;I'd like to handle my table outside the nested for loop, but I can't. In the example above I try to drop the table just outside the end of the FOR statement. When I reload data an error is raised saying that the table does not exist. I receive the same error if I try to uncomment the Drop Tabe statement inside the IF caluse.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Furthermore I can show tmp_table values inside my dashbord but I see no trace of the table inside Table Viewer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;What is happening? can someone, please, explain me whant I'm actually doing wrong?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Andrea&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 10:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579692#M215469</guid>
      <dc:creator />
      <dc:date>2014-02-13T10:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create table inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579693#M215470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if condition is not filled, table is not created so you can't drop it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remark : ELSE is not mandatory if you don't have any instructions&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, 13 Feb 2014 10:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579693#M215470</guid>
      <dc:creator />
      <dc:date>2014-02-13T10:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create table inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579694#M215471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;thank you for your fast reply. Sometimes (7000 times, actually) condition is filled, so I have 7000 rows in my table. Table exists, so I suppose to be able to drop it, right?&lt;/P&gt;&lt;P&gt;Thanks for your remark, I forgot to remove it.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 10:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579694#M215471</guid>
      <dc:creator />
      <dc:date>2014-02-13T10:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create table inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579695#M215472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the fields are there, they are being place in some table. The Concatenate keyword is causing it to be concatenated with the previously created table in the script, not the tmp_table. It looks to me like you can remove the Concatenate keyword in this case.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create listboxes for $Field and $Table. Click on the fieldname to find out what table it's in. &lt;/P&gt;&lt;P&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"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 13:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579695#M215472</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-02-13T13:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create table inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579696#M215473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob,&lt;/P&gt;&lt;P&gt;it's a pleasure to have an answer by you. It's correct, what was disorienting to me was finding tmpTable.Indentation, for example, within the available fields. This is actually the unqualified name, and not the fully qualified one.&lt;/P&gt;&lt;P&gt;Anyway I still need the Concatenate statement in order not to recreate a copy of the table on each FOR-cycle execution (I see messages like tmp_table-1234 &amp;lt;&amp;lt; AUTOGENERATE(1) when reloading data ad the whole load process is very slow). I'll try to declare a table just before the first FOR cycle in order to concatenate the rows to this table, maybe I'll fill it with a fake row (I think I cannot declare a table name without inserting any data, right?)&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 14:45:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579696#M215473</guid>
      <dc:creator />
      <dc:date>2014-02-13T14:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create table inside Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579697#M215474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can create a dummy table prior to the concat like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp_table:&lt;/P&gt;&lt;P&gt;LOAD 1 as Dummy autogenerate 1;&lt;/P&gt;&lt;P&gt;...then do your loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP FIELD Dummy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 15:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-table-inside-Load-Script/m-p/579697#M215474</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-02-13T15:22:26Z</dc:date>
    </item>
  </channel>
</rss>

