<?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: Chunk data returned from a query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135604#M911591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Next indicates that qlikview need to execute next "for" loop increment&lt;/P&gt;&lt;P&gt;After next you can store your qvd, yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 20:04:26 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2016-06-06T20:04:26Z</dc:date>
    <item>
      <title>Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135596#M911583</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 have a very simple query in my load script that is pulling a lot of rows (300+ million) from a table in Oracle. It was working fine for a while (so there's nothing wrong with the query's syntax), but it started timing out recently. I've spoken to my DBA, and he said that I need to chunk my data so that I'm not going after all the rows at one time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the original query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PartnerTerritoryOrderHistory:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Country KY],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Partner ID],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Product Key],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Type],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Type]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_country_ky AS "MI Country KY",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.partner_ky AS "Partner ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_product_ky AS "MI Product Key",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_action_type AS "Action Type",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_status AS "Status Type"&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rpt_dw.dcr_order_history_product hst&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.PARTNER_KY IN &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;(183,13245,1733,1089,28209,25683,28449,27969,27611,26487,25565,25563,25005,23881,23761,27649,26847,26567,25885,24563,24443,3103,546,27651,27327,26767,26003,25883,25083,8337,23921,27249,25443,24843,24765,24763,24723,24403,24203,27489,26967,26647,26609,26607,26485,26045,25643,25363,25283,25123,1433,22803,21319,21081,20685,20519,12631,22125,21921,21483,21441,21159,16199,2111,16519,5257,2879,23321,21721,21521,1331,16001,19281,2899,22721,7579,21199,2705,6497,20041,6657,23521,2237,10657,22601,22561,21601,2695,20279,18959,22481,21641,20959,20319,3701,15441,14603,21279,21121,21039,15839,12227,2416,2839,6777,22321,21361,20799,20559,13801,20399,14919,20199,20159,18919,18439,17399,16999,16039,15999,13799,18319,17439,16479,16159,13679,18489,18279,17279,15279,14363,18079,14999,18359,17999,17519,17239,16439,14843,14361,14359,13681,13605,15759,15639,15439,4737,11027,13959,18533,13167,13247,12999,11819,12143,11541,11381,2709,2699,2691,10699,2823,8581,8819,9137,2552,10577,9819,8699,7777,3463,3977,3337,10021,2707,4057,7977,6737,8977,6857,3617,2829,2847,3079,7711,5459,2254,2236,4937,10937,7057,7337,7177,3741,1894,1893,11021,1714,1655,1614,4217,1151,368,277,8457,4897,3857,7539,648,3073,3067,9737,10457,192,9459,9423,2821)&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE * FROM PartnerTerritoryOrderHistory INTO '..\qvds\PartnerTerritoryOrderHistory.qvd' (QVD);&lt;/P&gt;&lt;P&gt;DROP TABLES PartnerTerritoryOrderHistory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, I want the result to be the same (i.e., all the data written to a single QVD). What I want to do going forward is have the load script automatically query this table by every unique country key (mi_country_ky column). In other words, let's say I have 200 unique country keys under the mi_country_ky column. I would want the script to loop through and essentially perform 200 individual queries by unique country key (thus "chunking" my results in 200 separate buckets), but still write all the data from each of the 200 queries to the same QVD (PartnerTerritoryOrderHistory.qvd). I don't know how to modify my script to do this though. Can anyone provide the correct syntax for this desired "looping/concatenation" that I want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135596#M911583</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135597#M911584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PartnerTerritoryOrderHistory:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Country KY],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Partner ID],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Product Key],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Type],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Type]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_country_ky AS "MI Country KY",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.partner_ky AS "Partner ID",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_product_ky AS "MI Product Key",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_action_type AS "Action Type",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_status AS "Status Type"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rpt_dw.dcr_order_history_product hst&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.PARTNER_KY = '&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif; color: #1f497d;"&gt;183'&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;'// Comment - You can use '&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit; font-size: 11pt; font-family: Calibri, sans-serif; color: #1f497d;"&gt;Concatenate' keyword on top of every load statement,but here in this case all the Fields&amp;nbsp; from the queries are same hence QV Appends the rows from each query,at the bottom of the table generated from the&amp;nbsp; Topmost load script//&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;//concatenate - refer to the comment//&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Country KY],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Partner ID],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Product Key],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Type],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Type]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_country_ky AS "MI Country KY",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.partner_ky AS "Partner ID",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_product_ky AS "MI Product Key",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_action_type AS "Action Type",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_status AS "Status Type"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rpt_dw.dcr_order_history_product hst&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.PARTNER_KY ='&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 11pt; font-family: Calibri, sans-serif; color: #1f497d;"&gt;13245' &lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- - - &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- - - &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- - -&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE * FROM PartnerTerritoryOrderHistory INTO '..\qvds\PartnerTerritoryOrderHistory.qvd' (QVD);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP TABLES PartnerTerritoryOrderHistory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;May be this way.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;But this is too tedious.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 16:24:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135597#M911584</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2016-06-06T16:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135598#M911585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wondering why you don´t have a date field into your &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;rpt_dw.dcr_order_history_product , the usual would be having a date field and use it as splitter (as Incremental Load from your qlikview manual)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 16:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135598#M911585</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T16:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135599#M911586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clever...thanks for your reply. I'm assuming you're talking about putting something in so that I only load the delta of what's changed since the previous load (FYI - I only run this once every 24hrs)? I'm just a beginner so I'm afraid I don't know how to do that. Isn't there some way I could modify the script to just loop through every country key (I want to do on country key rather than partner key) and just concatenate all the results at the end? Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 17:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135599#M911586</guid>
      <dc:creator />
      <dc:date>2016-06-06T17:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135600#M911587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt; country key is a fixed list?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135600#M911587</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T18:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135601#M911588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it's more of a fixed list than the partner key list. In other words, it would be very rare for a new country key to be added to that column, but I suppose it's possible. Ideally, I'd like to write the script so that it loops through each unique country key under that column -- whatever that list of country keys might be at any given moment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135601#M911588</guid>
      <dc:creator />
      <dc:date>2016-06-06T18:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135602#M911589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think something like this should work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14652394251553473" jivemacro_uid="_14652394251553473" modifiedtitle="true"&gt;
&lt;P&gt;Country:&lt;/P&gt;
&lt;P&gt;LOAD * Inline [&lt;/P&gt;
&lt;P&gt;Country&lt;/P&gt;
&lt;P&gt;India&lt;/P&gt;
&lt;P&gt;China&lt;/P&gt;
&lt;P&gt;USA&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For i = 1 to NoOfRows('Country');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET country = Peek('Country',i,'Country');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; PartnerTerritoryOrderHistory:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Country KY],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Partner ID],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Product Key],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Type],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Type]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SQL&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SELECT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_country_ky AS "MI Country KY",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.partner_ky AS "Partner ID",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_product_ky AS "MI Product Key",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_action_type AS "Action Type",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_status AS "Status Type"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rpt_dw.dcr_order_history_product hst&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; hst.coyntry = '$(country)';&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 18:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135602#M911589</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T18:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135603#M911590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does line 31 with "Next" do? What would I write after "Next?" Would it be the Store statement for the QVD? Apologies, but what you wrote above is a little advanced for me, so I'm not sure what the code is doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 19:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135603#M911590</guid>
      <dc:creator />
      <dc:date>2016-06-06T19:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135604#M911591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Next indicates that qlikview need to execute next "for" loop increment&lt;/P&gt;&lt;P&gt;After next you can store your qvd, yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135604#M911591</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T20:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135605#M911592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Further reading &lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/For.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/For.htm"&gt;http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/ScriptControlStatements/For.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incremental load (if you can use a date field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/QVD_Incremental.htm" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/QVD_Incremental.htm"&gt;http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/QVD_Incremental.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:09:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135605#M911592</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-06T20:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135606#M911593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clever...I think I'm 99% there. I tweaked your code slightly for my situation, and it is cycling through each individual country key like I want. However, in the log for the QVW, the end looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QVW Log.jpg" class="jive-image image-1" src="/legacyfs/online/127280_QVW Log.jpg" style="height: 376px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand why it's doing that last query with the blank country key (the second red rectangle) and why it has "127 lines fetched" twice. The country key in the top red rectangle (14077248) is the last country key in the cycle. Do you know why it's doing that? Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135606#M911593</guid>
      <dc:creator />
      <dc:date>2016-06-08T15:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135607#M911594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you mind posting the Inline table and the For part?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135607#M911594</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-08T15:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135608#M911595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the code I'm using. I'm not loading the country key table as an inline table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CountryKeys:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Country Key]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISTINCT mi_country_ky AS "MI Country Key"&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rpt_dw.dcr_order_history_product&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mi_product_ky='1381605760' AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; partner_ky='11381'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 0 to NoOfRows('CountryKeys');&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vCountryKeys = Peek('MI Country Key',i,'CountryKeys');&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PartnerTerritoryOrderHistory:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Country KY],&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Partner ID],&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MI Product Key],&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Action Type],&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Status Type]&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; SELECT&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_country_ky AS "MI Country KY",&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.partner_ky AS "Partner ID",&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.mi_product_ky AS "MI Product Key",&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_action_type AS "Action Type",&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hst.latest_ofr_status AS "Status Type"&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rpt_dw.dcr_order_history_product hst&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; WHERE&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; hst.mi_country_ky = '$(vCountryKeys)' AND&lt;/P&gt;&lt;P&gt;&amp;nbsp; hst.PARTNER_KY IN (11381) AND&lt;/P&gt;&lt;P&gt;&amp;nbsp; hst.mi_product_ky='1381605760';&amp;nbsp; &lt;/P&gt;&lt;P&gt;Next&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE * FROM PartnerTerritoryOrderHistory INTO '..\qvds\DataChunkingTest.qvd' (QVD);&lt;/P&gt;&lt;P&gt;DROP TABLES PartnerTerritoryOrderHistory, CountryKeys;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135608#M911595</guid>
      <dc:creator />
      <dc:date>2016-06-08T15:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135609#M911596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;For i = 0 to NoOfRows('CountryKeys')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;should be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For i = 0 to NoOfRows('CountryKeys') -1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135609#M911596</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-08T15:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135610#M911597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your help. You went above and beyond. Really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135610#M911597</guid>
      <dc:creator />
      <dc:date>2016-06-08T15:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135611#M911598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to read is working now &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Be Qlik, have fun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 16:15:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135611#M911598</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-08T16:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135612#M911599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clever...when I apply the code to my real and full set of data, it is way too slow. In the end, I need to load about 310+ million rows. In the past, when I would run my original simple query (before I started getting issues with it timing out), it would take about 2.5 hrs to pull back 300+ million rows. Now, with the FOR...NEXT looping, it's been running for 3+ hours and it has only pulled back ~20 million rows. Is there a way to optimize this significantly? If not, I think I'll have to look for another solution. The code works as I want it to...I just don't know why it's so slow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135612#M911599</guid>
      <dc:creator />
      <dc:date>2016-06-08T20:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Chunk data returned from a query</title>
      <link>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135613#M911600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please ask your DBA Team if it´possible to create indexes for this columns&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp; hst.mi_country_ky &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp; hst.PARTNER_KY IN &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp; hst.mi_product_ky&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;I´m guessing they are not indexed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Chunk-data-returned-from-a-query/m-p/1135613#M911600</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-06-08T20:59:06Z</dc:date>
    </item>
  </channel>
</rss>

