<?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 Stop load after first record in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145666#M24328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dino,&lt;BR /&gt;Use this:&lt;BR /&gt;&lt;STRONG&gt;First 1;&lt;/STRONG&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;...&lt;BR /&gt;(I often use "first 100" for script testing to avoid long load.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2009 01:09:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-06-03T01:09:07Z</dc:date>
    <item>
      <title>Stop load after first record</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145665#M24327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm reading a file whose first record is just ahead showing the date the file was created. The second record is the field list and the rest is data. My first step is to load the file to get the date from the first record and load it into a variable, which will be used to show the user how current the data is. After that, it's a normal load of the data. Here what the script does...&lt;/P&gt;&lt;H4&gt;FindDate:&lt;BR /&gt;LOAD&lt;BR /&gt; @2 AS InvHistInfoFileDate&lt;BR /&gt;FROM&lt;BR /&gt; [$(vDataFolder)\QlikBillingInfo.txt] (ansi, txt, delimiter is ';', explicit labels, msq)&lt;BR /&gt;WHERE&lt;BR /&gt; RecNo()=1;&lt;/H4&gt;&lt;H4&gt;LET vInvHistInfoFileDate = num(peek('InvHistInfoFileDate', 0, 'FindDate'));&lt;/H4&gt;&lt;H4&gt;DROP TABLE FindDate;&lt;/H4&gt;&lt;P&gt;It works perfectly, but I'm finding it takes a long time to get the date. I'm guessing that it's reading the entire file just to find out there's only one record with RecNo()=1.&lt;/P&gt;&lt;P&gt;Any ideas on how I can make the load script actually stop after the first record and move on?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Dino&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 23:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145665#M24327</guid>
      <dc:creator />
      <dc:date>2009-06-02T23:54:19Z</dc:date>
    </item>
    <item>
      <title>Stop load after first record</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145666#M24328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dino,&lt;BR /&gt;Use this:&lt;BR /&gt;&lt;STRONG&gt;First 1;&lt;/STRONG&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;...&lt;BR /&gt;(I often use "first 100" for script testing to avoid long load.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 01:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145666#M24328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-03T01:09:07Z</dc:date>
    </item>
    <item>
      <title>Stop load after first record</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145667#M24329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that did it...I was even able to do away with the WHERE clause.&lt;/P&gt;&lt;P&gt;That was way too simple - somehow, I'm thinking I should have already known how to do this. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Dino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 01:52:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145667#M24329</guid>
      <dc:creator />
      <dc:date>2009-06-03T01:52:08Z</dc:date>
    </item>
    <item>
      <title>Stop load after first record</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145668#M24330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's not a problem. I'm still finding, after many years using QV, things and solutions I don't know, sometimes simple... &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 02:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145668#M24330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-03T02:15:01Z</dc:date>
    </item>
    <item>
      <title>Stop load after first record</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145669#M24331</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 would suggest you try the "first" function. simply put &lt;STRONG&gt;First 1&lt;/STRONG&gt; before Laod and it will only laod one record. I have not tested it but it's worth a try I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 04:29:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145669#M24331</guid>
      <dc:creator />
      <dc:date>2009-06-03T04:29:25Z</dc:date>
    </item>
    <item>
      <title>Stop load after first record</title>
      <link>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145670#M24332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry guys I did not see that Michael ahd already replied to this. &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 04:31:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Stop-load-after-first-record/m-p/145670#M24332</guid>
      <dc:creator />
      <dc:date>2009-06-03T04:31:10Z</dc:date>
    </item>
  </channel>
</rss>

