<?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 Load database data using a loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162182#M35772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to be able to load a database file using a loop on an ID. Our current load is taking too long and if I load an ID at a time it works quicker.&lt;/P&gt;&lt;P&gt;For example, I need to be able to load all the data from the table, but only the data associated by one field_id at a time - and then store all the data into a qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be grateful for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Aug 2010 13:30:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-16T13:30:27Z</dc:date>
    <item>
      <title>Load database data using a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162182#M35772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to be able to load a database file using a loop on an ID. Our current load is taking too long and if I load an ID at a time it works quicker.&lt;/P&gt;&lt;P&gt;For example, I need to be able to load all the data from the table, but only the data associated by one field_id at a time - and then store all the data into a qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be grateful for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 13:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162182#M35772</guid>
      <dc:creator />
      <dc:date>2010-08-16T13:30:27Z</dc:date>
    </item>
    <item>
      <title>Re. :Load database data using a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162183#M35773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;FOR i = 2005 TO Year(Today())&lt;BR /&gt;Datas_$(i):&lt;BR /&gt;LOAD ....;&lt;BR /&gt;SQL SELECT ...&lt;BR /&gt;FROM MyTable&lt;BR /&gt;WHERE Year = $(i);&lt;BR /&gt;STORE Datas_$(i) into Datas_$(i).qvd;&lt;BR /&gt;DROP TABLE Datas_$(i);&lt;BR /&gt;NEXT&amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 13:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162183#M35773</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2010-08-16T13:33:33Z</dc:date>
    </item>
    <item>
      <title>Re. :Load database data using a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162184#M35774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank-you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need to be able to do is this but using a field ID - how do I get to do that as this wil increase each month, and will not be a date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Sally&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 14:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162184#M35774</guid>
      <dc:creator />
      <dc:date>2010-08-16T14:08:54Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Load database data using a loop</title>
      <link>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162185#M35775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to know how much lines you will load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Max:&lt;BR /&gt;LOAD Max;&lt;BR /&gt;SQL SELECT Max(id) Max&lt;BR /&gt;FROM MyTable;&lt;BR /&gt;LET vMaxId = peek('Max');&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can specify your step&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LET vStep = 10000; // number of rows per qvd&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You have to create your loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;FOR i=0 TO $(vMaxId) STEP $(vStep)&lt;BR /&gt;Datas_First$(i):&lt;BR /&gt;LOAD *;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM MyTable&lt;BR /&gt;WHERE id&amp;gt;$(i) AND id &amp;lt;=$(i)+$(vStep);&lt;BR /&gt;STORE Datas_First$(i) INTO Datas_First$(i).qvd;&lt;BR /&gt;DROP TABLE Datas_First$(i);&lt;BR /&gt;NEXT&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Don't try this code, but it must be something like that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 14:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-database-data-using-a-loop/m-p/162185#M35775</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2010-08-16T14:21:12Z</dc:date>
    </item>
  </channel>
</rss>

