<?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: Load Exit - Conditional in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432092#M161086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;load A,&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;from Test where B='XX';&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 May 2013 05:42:20 GMT</pubDate>
    <dc:creator>er_mohit</dc:creator>
    <dc:date>2013-05-07T05:42:20Z</dc:date>
    <item>
      <title>Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432091#M161085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my load script to stop once a certain value is reached for a field. Something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&amp;nbsp;&amp;nbsp; A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;From .... exit/stop load(should not exit script) when found B='XX'(line number is not fixed, so can't use recno());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 05:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432091#M161085</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-05-07T05:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432092#M161086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;load A,&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;from Test where B='XX';&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 05:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432092#M161086</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-05-07T05:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432093#M161087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. However, this is not what i want. i want my &lt;STRONG&gt;LOAD to STOP &lt;/STRONG&gt;reaching at the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 05:52:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432093#M161087</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-05-07T05:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432094#M161088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="Code"&gt;&lt;STRONG&gt;exit script when B='XX'&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 05:54:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432094#M161088</guid>
      <dc:creator />
      <dc:date>2013-05-07T05:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432095#M161089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exit LOAD is desired, not exit SCRIPT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 05:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432095#M161089</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-05-07T05:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432096#M161090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Test&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load A,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;exit script when B='XX'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;test2&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load * from table2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;note--&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;here in Test table, if B='XX' found, then exit or stop the script, so test2 table not run.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 06:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432096#M161090</guid>
      <dc:creator />
      <dc:date>2013-05-07T06:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432097#M161091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See, the scenario is - my source file has multiple tables. first table ends by indicating that field B="XX" for first table and then the second table starts. Therefore i have to stop load for first table at a condition and start the second table load. that means i can't use 'EXIT SCRIPT'. by using multiple stages (storing to qvd and then using flag or variable), may be i can achieve the same. But i was just wondering if there is any easier way(without storing in qvd). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 06:20:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432097#M161091</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-05-07T06:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432098#M161092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the exists() function which indicates if a certain value exists in a specified field.&lt;/P&gt;&lt;P&gt;This gives the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your_table&amp;gt; :&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;FROM &amp;lt;your_source&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE NOT Exists( B , 'XX' ) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once done, you have the value 'XX' in your field B. In order to eliminate it, you should do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;RIGHT KEEP( &amp;lt;your_table&amp;gt; )&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;RESIDENT &amp;lt;your_table&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE B &amp;lt;&amp;gt; 'XX' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE tmp ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN id="xpndit_tooltip" style="display: none; position: absolute; overflow: hidden; max-width: 400px; background-color: #fefefe; border: 1px solid #aaaaaa; padding: 4px 8px; font-size: 11px; letter-spacing: 0px; color: #000000; z-index: 5000; line-height: 120%; text-align: left; border-radius: 5px 5px 5px 5px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 07:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432098#M161092</guid>
      <dc:creator>rlp</dc:creator>
      <dc:date>2013-05-07T07:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432099#M161093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input. if exists() is used, the load goes on even after reaching the conditional value(i.e. the followed records would not be excluded in load). i want the load to suspend the further records load once the conditon is reached. something logical like use of BREAK and jump to another load statement in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 08:11:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432099#M161093</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-05-07T08:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432100#M161094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's strange that the 'NOT exists()' doesn't work.&lt;/P&gt;&lt;P&gt;You can try a more manual method, which consists of creating another field which contains '0' until 'XX' occured and '1' after:&lt;/P&gt;&lt;P&gt;In your load, add this definition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;your_table&amp;gt; :&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( peek(indic_occured_value) OR B='XX' , '1' , '0' ) as indic_occured_value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM &amp;lt;your_source&amp;gt; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;RIGHT KEEP( &amp;lt;your_table&amp;gt; )&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '0' as indic_occured_value&lt;/P&gt;&lt;P&gt;AUTOGENERATE( 1 ) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE tmp ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to keep, the first occurence of 'XX' , you should replace&amp;nbsp; B='XX' by peek(B) = 'XX' in the expression of indic_occured_value ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN id="xpndit_tooltip" style="display: none; position: absolute; overflow: hidden; max-width: 400px; background-color: #fefefe; border: 1px solid #aaaaaa; padding: 4px 8px; font-size: 11px; letter-spacing: 0px; color: #000000; z-index: 5000; line-height: 120%; text-align: left; border-radius: 5px 5px 5px 5px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 09:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432100#M161094</guid>
      <dc:creator>rlp</dc:creator>
      <dc:date>2013-05-07T09:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432101#M161095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think so. I'm afraid you'll need something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;load B, if(B='XX',recno()) as flag&lt;/P&gt;&lt;P&gt;from &lt;EM&gt;...somewhere...&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T2:&lt;/P&gt;&lt;P&gt;load min(flag) as firstmatch&lt;/P&gt;&lt;P&gt;resident T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vFirst = peek('firstmatch');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table T1, T2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T3:&lt;/P&gt;&lt;P&gt;first $(vFirst)&lt;/P&gt;&lt;P&gt;load * from &lt;EM&gt;...somewhere...&lt;/EM&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 09:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432101#M161095</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-07T09:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Load Exit - Conditional</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432102#M161096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Gysbert, as i mentioned earlier - "using multiple stages (storing to qvd and then using flag or variable), may be i can achieve the same" - seems that, this is the way(like you suggested) i have to follow. Probably there is no direct way/function/command to break out from the LOAD process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway thank you all.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 09:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Exit-Conditional/m-p/432102#M161096</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-05-07T09:52:36Z</dc:date>
    </item>
  </channel>
</rss>

