<?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 Problem with LOAD inside a FOR/NEXT clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153497#M30505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out.&lt;/P&gt;&lt;P&gt;it was a problem with the resident table Map_Fields&lt;/P&gt;&lt;P&gt;This did the trick:&lt;/P&gt;&lt;P&gt;FOR NRO=1 TO 5&lt;BR /&gt;MAP_FIELDS$(NRO):&lt;BR /&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;NAME_FROM,NAME_TO&lt;BR /&gt;SIGLUF_VSUFS,SIGLUF_VSUFS$(NRO)&lt;BR /&gt;NOMEUF_VSUFS,NOMEUF_VSUFS$(NRO)&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;VSUFS$(NRO):&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; *&lt;BR /&gt;FROM TEST165P.CSV (OEM, TXT, DELIMITER IS ';', EMBEDDED LABELS, NO QUOTES);&lt;BR /&gt;&lt;BR /&gt;RENAME FIELDS USING MAP_FIELDS$(NRO);&lt;BR /&gt;&lt;BR /&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 May 2010 18:32:40 GMT</pubDate>
    <dc:creator>boorgura</dc:creator>
    <dc:date>2010-05-17T18:32:40Z</dc:date>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153491#M30499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to load the same table several times, each time giving a different name to it's fields.&lt;/P&gt;&lt;P&gt;Say that I have a "NAME" field on the table. Then I want to load it once as NAME1 then NAME2 and so forth up to NAME10.&lt;/P&gt;&lt;P&gt;Looks easy but it does not work !&lt;/P&gt;&lt;P&gt;Attached sample is pretty straightforward to check the problem !&lt;/P&gt;&lt;P&gt;Any hints or suggestions ?&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 17:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153491#M30499</guid>
      <dc:creator />
      <dc:date>2010-05-17T17:05:32Z</dc:date>
    </item>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153492#M30500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adriano,&lt;/P&gt;&lt;P&gt;not sure if you were looking for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR NRO = 1 TO 5&lt;BR /&gt;&lt;BR /&gt;VSUFS$(NRO):&lt;BR /&gt;LOAD SIGLUF_VSUFS as SIGLUF_VSUFS$(NRO),&lt;BR /&gt; NOMEUF_VSUFS as NOMEUF_VSUFS$(NRO)&lt;BR /&gt;FROM [TEST165P.CSV] (ansi, txt, delimiter is ';', embedded labels, msq);&lt;BR /&gt;&lt;BR /&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 17:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153492#M30500</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-17T17:15:05Z</dc:date>
    </item>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153493#M30501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Moreover,&lt;/P&gt;&lt;P&gt;if you want them in the same table:&lt;/P&gt;&lt;P&gt;you can use concatenate(VSUFS)&lt;/P&gt;&lt;P&gt;as opposed to storing into a new resident table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 17:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153493#M30501</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-17T17:16:32Z</dc:date>
    </item>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153494#M30502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It could work. But I'm intrigued why my original MAP approach does not work.&lt;/P&gt;&lt;P&gt;As for concatenating, not a good idea.&lt;/P&gt;&lt;P&gt;This table above is for STATES or PROVINCES.&lt;/P&gt;&lt;P&gt;Say that I have a CLIENT table with three STATEs fields :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;STATE where CLIENT was born&lt;/LI&gt;&lt;LI&gt;STATE where CLIENT did last order&lt;/LI&gt;&lt;LI&gt;STATE where CLIENT is living&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So, we have three foreign keys pointing to the same table (STATEs). I prefered to clone this table. Thus the need to replicate it's load in three different tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 17:38:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153494#M30502</guid>
      <dc:creator />
      <dc:date>2010-05-17T17:38:28Z</dc:date>
    </item>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153495#M30503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the earlier scenario, you were trying to rename all fields to &amp;lt;fieldname&amp;gt; followed by 1&lt;/P&gt;&lt;P&gt;instead of &amp;lt;fieldname&amp;gt; followed by $(NRO)&lt;/P&gt;&lt;P&gt;I would assume that to be the reason.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 17:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153495#M30503</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-17T17:40:47Z</dc:date>
    </item>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153496#M30504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I posted wrong the ZIP file. Get it again and you'll see it fixed...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 18:03:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153496#M30504</guid>
      <dc:creator />
      <dc:date>2010-05-17T18:03:30Z</dc:date>
    </item>
    <item>
      <title>Problem with LOAD inside a FOR/NEXT clause</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153497#M30505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out.&lt;/P&gt;&lt;P&gt;it was a problem with the resident table Map_Fields&lt;/P&gt;&lt;P&gt;This did the trick:&lt;/P&gt;&lt;P&gt;FOR NRO=1 TO 5&lt;BR /&gt;MAP_FIELDS$(NRO):&lt;BR /&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;NAME_FROM,NAME_TO&lt;BR /&gt;SIGLUF_VSUFS,SIGLUF_VSUFS$(NRO)&lt;BR /&gt;NOMEUF_VSUFS,NOMEUF_VSUFS$(NRO)&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;VSUFS$(NRO):&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; *&lt;BR /&gt;FROM TEST165P.CSV (OEM, TXT, DELIMITER IS ';', EMBEDDED LABELS, NO QUOTES);&lt;BR /&gt;&lt;BR /&gt;RENAME FIELDS USING MAP_FIELDS$(NRO);&lt;BR /&gt;&lt;BR /&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 18:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-LOAD-inside-a-FOR-NEXT-clause/m-p/153497#M30505</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-17T18:32:40Z</dc:date>
    </item>
  </channel>
</rss>

