<?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 Using for each ... next in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151092#M29006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emma,&lt;/P&gt;&lt;P&gt;Thanks for the reply... actually dublication here is some abnormal number of records... but i already resolve this issue.&lt;/P&gt;&lt;P&gt;Basically i was looking out the records by loading it in debug mode where i put a limit of 10 records and uncertainly i am getting higher / abnormal number of records with respect to higher date file... attached snapshot is showing the date field i have in each qvd.&lt;/P&gt;&lt;P&gt;when i use the full reload regardless of in debug mode... i got the valid number of records. I still don't know why this debug mode showing me this abnormal count.. &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Nov 2009 18:39:00 GMT</pubDate>
    <dc:creator>shumailh</dc:creator>
    <dc:date>2009-11-23T18:39:00Z</dc:date>
    <item>
      <title>Using for each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151088#M29002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to run a report out of our main data system but becasue it's such a slow / complicated report in the back group I need to run the query for each site code (contract) in turn rather than just using a wild card.&lt;/P&gt;&lt;P&gt;I think the for each ... next function will do this but I'm just not quite clear on how to actually do it! Below is the report as it stands with a single base code in. Ideally I'd like to load the list of base codes I want to search for from an excel document.&lt;/P&gt;&lt;P&gt;Thanks, Emma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;select&lt;/B&gt;&lt;/P&gt;&lt;P&gt;contract,&lt;/P&gt;&lt;P&gt;purch_order_no,&lt;/P&gt;&lt;P&gt;purch_line_no,&lt;/P&gt;&lt;P&gt;purch_rel_no,&lt;/P&gt;&lt;P&gt;part_no,&lt;/P&gt;&lt;P&gt;serial_no,&lt;/P&gt;&lt;P&gt;lot_batch_no,&lt;/P&gt;&lt;P&gt;qty_received,&lt;/P&gt;&lt;P&gt;qty_shipped,&lt;/P&gt;&lt;P&gt;unit_meas,&lt;/P&gt;&lt;P&gt;received_date,&lt;/P&gt;&lt;P&gt;shipped_date,&lt;/P&gt;&lt;P&gt;cust_order_no,&lt;/P&gt;&lt;P&gt;cust_line_no,&lt;/P&gt;&lt;P&gt;cust_rel_no,&lt;/P&gt;&lt;P&gt;cust_line_item_no,&lt;/P&gt;&lt;P&gt;from_site,&lt;/P&gt;&lt;P&gt;state,&lt;/P&gt;&lt;P&gt;to_char(ifsapp.Inventory_Part_Config_API.Get_Inventory_Value_By_Method(contract, part_no, '*'), 'B99999990.99') unit_cost,&lt;/P&gt;&lt;P&gt;IFSAPP.PART_CATALOG_API.Get_Description(part_no) description&lt;/P&gt;&lt;P&gt;&lt;B&gt;from&lt;/B&gt;&lt;/P&gt;&lt;P&gt;ifsapp.inventory_parts_in_transit&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;contract = '2SABD'&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;part_no between '0' and 'ZZZZZZZZZZZZZ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 18:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151088#M29002</guid>
      <dc:creator />
      <dc:date>2009-08-05T18:59:31Z</dc:date>
    </item>
    <item>
      <title>Using for each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151089#M29003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, maybe you can use the for each in this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;For each contract in '2SABD','2SABC','3SABD'&lt;BR /&gt;&lt;BR /&gt;DATA:&lt;BR /&gt;SQL select&lt;BR /&gt; ...&lt;BR /&gt; contract,&lt;BR /&gt; purch_order_no,&lt;BR /&gt; ...&lt;BR /&gt; to_char(ifsapp.Inventory_Part_Config_API.Get_Inventory_Value_By_Method(contract, part_no, '*'), 'B99999990.99') unit_cost,&lt;BR /&gt; IFSAPP.PART_CATALOG_API.Get_Description(part_no) description&lt;BR /&gt;from&lt;BR /&gt; ifsapp.inventory_parts_in_transit&lt;BR /&gt;where&lt;BR /&gt; contract = '$(contract)' and&lt;BR /&gt; part_no between '0' and 'ZZZZZZZZZZZZZ'&lt;BR /&gt;;&lt;BR /&gt;next&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this can help u.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 21:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151089#M29003</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2009-08-05T21:07:57Z</dc:date>
    </item>
    <item>
      <title>Using for each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151090#M29004</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 have a small problem would appreciate if any one can help. I have developed an application which generates a qvd on daily basis now i want to update the process to merge qvd's in to 1 on daily basis. I tried to use for each statement and use concatenation but the concatenation not working fine... it create lots of dublications... may be i am not working right with the table alias "Active_Card" while loading. need help!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;$(include=Configuration.txt);&lt;BR /&gt;&lt;BR /&gt;let path= '$(prepath)' &amp;amp; '\Output\' &amp;amp; '$(mn)' &amp;amp; '\Cards\QVDs\';&lt;BR /&gt;&lt;BR /&gt;let a = 1;&lt;BR /&gt;&lt;BR /&gt;for each File in filelist ('$(path)ActiveCard_*.qvd')&lt;BR /&gt;&lt;BR /&gt;let CurrentFileName = right('$(File)', (len('$(File)') - len('$(path)')) ) ;&lt;BR /&gt;let AC = 'ActiveCard_' &amp;amp; right('00' &amp;amp;'$(CurrentDay)', 2) &amp;amp; '.qvd';&lt;BR /&gt;&lt;BR /&gt; if a = 1 then&lt;BR /&gt; Active_Card:&lt;BR /&gt; LOAD *&lt;BR /&gt; FROM [$(path)$(CurrentFileName)] (qvd);&lt;BR /&gt;&lt;BR /&gt; else&lt;BR /&gt;&lt;BR /&gt; Active_Card:&lt;BR /&gt; LOAD&lt;BR /&gt; limit,&lt;BR /&gt; bal,&lt;BR /&gt; delq,&lt;BR /&gt; AIF&lt;BR /&gt; RESIDENT Active_Card;&lt;BR /&gt; CONCATENATE&lt;BR /&gt; LOAD&lt;BR /&gt; limit,&lt;BR /&gt; bal,&lt;BR /&gt; delq,&lt;BR /&gt; AIF&lt;BR /&gt; FROM [$(path)$(CurrentFileName)] (qvd);&lt;BR /&gt;&lt;BR /&gt; END IF&lt;BR /&gt;&lt;BR /&gt; a = a+1&lt;BR /&gt;&lt;BR /&gt;next File ;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Shumail Hussain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 16:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151090#M29004</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2009-11-23T16:59:24Z</dc:date>
    </item>
    <item>
      <title>Using for each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151091#M29005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To remove the duplications have you tried using something like NOT EXISTS(FieldName) in the load statement? The field name you use should be unique of course.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Emma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 17:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151091#M29005</guid>
      <dc:creator />
      <dc:date>2009-11-23T17:11:04Z</dc:date>
    </item>
    <item>
      <title>Using for each ... next</title>
      <link>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151092#M29006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emma,&lt;/P&gt;&lt;P&gt;Thanks for the reply... actually dublication here is some abnormal number of records... but i already resolve this issue.&lt;/P&gt;&lt;P&gt;Basically i was looking out the records by loading it in debug mode where i put a limit of 10 records and uncertainly i am getting higher / abnormal number of records with respect to higher date file... attached snapshot is showing the date field i have in each qvd.&lt;/P&gt;&lt;P&gt;when i use the full reload regardless of in debug mode... i got the valid number of records. I still don't know why this debug mode showing me this abnormal count.. &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 18:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-for-each-next/m-p/151092#M29006</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2009-11-23T18:39:00Z</dc:date>
    </item>
  </channel>
</rss>

