<?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: Help with Loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191012#M627408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each vYear in $(vMaxYear),$(vMaxYear-1),$(vMaxYear-2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vYear)QVD:&lt;/P&gt;&lt;P&gt;Select ....&lt;/P&gt;&lt;P&gt;From DB&lt;/P&gt;&lt;P&gt;Where (Year,vYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store &lt;SPAN style="font-size: 13.3333px;"&gt;$(vYear)QVD into Path/&lt;SPAN style="font-size: 13.3333px;"&gt;$(vYear)QVD&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just an idea, it would need improvement to make it work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Sep 2016 09:14:32 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2016-09-23T09:14:32Z</dc:date>
    <item>
      <title>Help with Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191011#M627407</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;&lt;/P&gt;&lt;P&gt;i am currently implementing an incremental load into an existing extract script. &lt;/P&gt;&lt;P&gt;here is a brief description on how my client wants it to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;an admin user would update a field in the db with the amount of previous years to go back to extract.&lt;/P&gt;&lt;P&gt;Transaction_Years = 2&lt;/P&gt;&lt;P&gt;so far i have added a variable for the max year (taken from the list of distinct years in the db and a variable for the Transaction_Year that has been entered by the admin person. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxYear = 2016&lt;/P&gt;&lt;P&gt;vTransaction_Year = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so what i want is to run a loop which loads all data for those years (2014,2015,2016) and stores each year into its own QVD. &lt;/P&gt;&lt;P&gt;apologies but i can't get my head around how to do this. &lt;/P&gt;&lt;P&gt;can anyone help please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 09:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191011#M627407</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2016-09-23T09:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191012#M627408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each vYear in $(vMaxYear),$(vMaxYear-1),$(vMaxYear-2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vYear)QVD:&lt;/P&gt;&lt;P&gt;Select ....&lt;/P&gt;&lt;P&gt;From DB&lt;/P&gt;&lt;P&gt;Where (Year,vYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store &lt;SPAN style="font-size: 13.3333px;"&gt;$(vYear)QVD into Path/&lt;SPAN style="font-size: 13.3333px;"&gt;$(vYear)QVD&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just an idea, it would need improvement to make it work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 09:14:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191012#M627408</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2016-09-23T09:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191013#M627409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//&lt;EM&gt;Create the QVDs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For i = (vMaxYear - vTransaction_Year + 1) To vMaxYear&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; SQL SELECT *&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; FROM SourceTable&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; WHERE Year = $(i);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; STORE Data into &lt;C&gt; (qvd);&lt;/C&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; DROP Table Data;&lt;/EM&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;Adjust the SQL SELECT and the QVD file name and path to match your requirements&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 09:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191013#M627409</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-09-23T09:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191014#M627410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan, thats exactly what i needed. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 09:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Loop/m-p/1191014#M627410</guid>
      <dc:creator>hopkinsc</dc:creator>
      <dc:date>2016-09-23T09:46:19Z</dc:date>
    </item>
  </channel>
</rss>

