<?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 Looping while loading the data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498514#M552202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to load the data within a loop. The following is my case,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General logic:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;my_data:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;ResultSet resultSet = "Select distinct designation, location from employee";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;for(int i = 0; i &amp;lt; resultSet.count; i++) {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;load emp_id, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; designation, location, salary;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;sql select * from employee where location = "&lt;SPAN style="color: #ff6600;"&gt;resultSet&lt;I&gt;.location&lt;/I&gt;&lt;/SPAN&gt;" , designation = "&lt;SPAN style="color: #ff6600;"&gt;resultSet&lt;I&gt;.designation&lt;/I&gt;&lt;/SPAN&gt;";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the above logic should be done while loading the data.&lt;SPAN style="color: #ff6600;"&gt; Every time it should concatenate/append with the existing data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please help me to get this done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Nov 2013 12:11:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-08T12:11:57Z</dc:date>
    <item>
      <title>Looping while loading the data</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498514#M552202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to load the data within a loop. The following is my case,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General logic:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;my_data:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;ResultSet resultSet = "Select distinct designation, location from employee";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;for(int i = 0; i &amp;lt; resultSet.count; i++) {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;load emp_id, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; designation, location, salary;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;sql select * from employee where location = "&lt;SPAN style="color: #ff6600;"&gt;resultSet&lt;I&gt;.location&lt;/I&gt;&lt;/SPAN&gt;" , designation = "&lt;SPAN style="color: #ff6600;"&gt;resultSet&lt;I&gt;.designation&lt;/I&gt;&lt;/SPAN&gt;";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the above logic should be done while loading the data.&lt;SPAN style="color: #ff6600;"&gt; Every time it should concatenate/append with the existing data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please help me to get this done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 12:11:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498514#M552202</guid>
      <dc:creator />
      <dc:date>2013-11-08T12:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Looping while loading the data</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498515#M552203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you attach a file ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 12:20:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498515#M552203</guid>
      <dc:creator>annafuksa1</dc:creator>
      <dc:date>2013-11-08T12:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Looping while loading the data</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498516#M552204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajaram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"For next" as well as "&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;For each next" is described with examples in the reference manual. If you have done a full installation of QlikView you can find it here :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;C:\ProgramData\QlikTech\QlikView Documentation\Reference Manual&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/Ida&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 12:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498516#M552204</guid>
      <dc:creator />
      <dc:date>2013-11-08T12:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Looping while loading the data</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498517#M552205</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 think this is what you are looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tmpLocationDesignation:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD Distinct &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Designation&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;From employee;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For i = 1 To NoOfRows('tmpLocationDesignation')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let zLocation = Peek('Location', i, 'tmpLocationDesignation');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let zDesignation = Peek('Designation', i, 'tmpLocationDesignation');&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; my_data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load emp_id,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; designation, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;location, &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; salary;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; sql select * from employee &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; where location = '$(zLocation)'&amp;nbsp; And designation = '$(zDesignation)';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Next&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set zLocation =;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set zDesignation =;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Drop Table tmpLocationDesignation;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 12:51:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-while-loading-the-data/m-p/498517#M552205</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-11-08T12:51:42Z</dc:date>
    </item>
  </channel>
</rss>

