<?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 Why does this IF (Exists not work? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306723#M1200249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Karl Pover wrote:...a quick test reveals that a "where exists" allows the the QVD to loaded as QVD Optimized (Fast), but a "where field=value" slows done the QVD load.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Yep, you're allowed a single "where exists" in an optimized load. So far as I know, that's the ONLY thing you can put in the "where" without slowing it down. Even a second "where exists" will slow it down.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Feb 2011 23:14:23 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-02-22T23:14:23Z</dc:date>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306715#M1200241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;___________________________________&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;SORDTEMP:&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; REF as SORDREF&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;FROM&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',')&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;WHERE DATE &amp;gt; '31/12/2010';&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;SORDITEM:&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; IF (Exists (SORDREF,REF), REF) as SORDREF,&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;ITEMREF,&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;ACCCODE,&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;NOMCODE&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;FROM&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;________________&lt;/P&gt;&lt;P&gt;Note - SORDTEMP - only loads orders that have been created in 2011 from the Order Header fle SORDERS1.csv.&lt;/P&gt;&lt;P&gt;SORDITEM - should load details fron file SORDITEM1.csv, but ONLY for those orders for which an order REF has been loaded into SORDTEMP&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 20:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306715#M1200241</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-02-17T20:53:40Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306716#M1200242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second load will load all records from the CSV. All you're doing is nulling out the SORDREF field when it wasn't in the other file, but the other fields will all load in. To avoid loading the rows at all, use where(exits(...)) like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;SORDITEM:&lt;BR /&gt;LOAD REF as SORDREF,&lt;BR /&gt;ITEMREF,&lt;BR /&gt;ACCCODE,&lt;BR /&gt;NOMCODE&lt;BR /&gt;FROM&lt;BR /&gt;&lt;C&gt;&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',')&lt;BR /&gt;WHERE exists(SORDREF,REF)&lt;BR /&gt;;&lt;/C&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 21:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306716#M1200242</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-17T21:40:14Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306717#M1200243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Move the exists() condition to a WHERE statement after the second table load, instead of an IF statement within the load itself.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 21:41:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306717#M1200243</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-02-17T21:41:06Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306718#M1200244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try doing one following:&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;SORDITEM:&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; REF as SORDREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ITEMREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ACCCODE,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;NOMCODE&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;FROM&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',')&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;where Exists (SORDREF,REF);&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;SORDITEM:&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;RIGHT KEEP (SORDTEMP)&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; REF as SORDREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ITEMREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ACCCODE,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;NOMCODE&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;FROM&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',');&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Each way should only load the REF's in SORDITEM that are also in SORDTEMP.&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Regards.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 21:42:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306718#M1200244</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-02-17T21:42:42Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306719#M1200245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edit: Where did the option to delete a post go???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try doing one following:&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;SORDITEM:&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; REF as SORDREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ITEMREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ACCCODE,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;NOMCODE&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;FROM&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',')&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;where Exists (SORDREF,REF);&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;SORDITEM:&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;RIGHT KEEP (SORDTEMP)&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; REF as SORDREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ITEMREF,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;ACCCODE,&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;NOMCODE&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;FROM&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',');&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Each way should only load the REF's in SORDITEM that are also in SORDTEMP.&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Regards.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 21:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306719#M1200245</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-02-17T21:42:43Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306720#M1200246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;Where Exists looks good - I will audit outcome properly and verify your suggestions accordingly.&lt;/P&gt;&lt;P&gt;Karl - will also try your second suggestion and verify if ok.&lt;/P&gt;&lt;P&gt;Great response! This realy is a great community!&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 02:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306720#M1200246</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-02-18T02:12:39Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306721#M1200247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karl&lt;/P&gt;&lt;P&gt;The first script worked for me. The second didn't.&lt;/P&gt;&lt;P&gt;The second loads all records from file SORDITEM1.csv&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 13:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306721#M1200247</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-02-22T13:58:19Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306722#M1200248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeap, you're right. I can't seem to get my left and right straight. You should use a Left Keep instead of a Right Keep.&lt;/P&gt;&lt;P&gt;I mentioned this solution because it is sometimes faster when loading large QVD's because the where statement will slow the QVD load while the Left Keep will let the QVD load fast and then filter out the rows you don't need.&lt;/P&gt;&lt;P&gt;However, a quick test reveals that a "where exists" allows the the QVD to loaded as QVD Optimized (Fast), but a "where field=value" slows done the QVD load.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 23:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306722#M1200248</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-02-22T23:00:14Z</dc:date>
    </item>
    <item>
      <title>Why does this IF (Exists not work?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306723#M1200249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Karl Pover wrote:...a quick test reveals that a "where exists" allows the the QVD to loaded as QVD Optimized (Fast), but a "where field=value" slows done the QVD load.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Yep, you're allowed a single "where exists" in an optimized load. So far as I know, that's the ONLY thing you can put in the "where" without slowing it down. Even a second "where exists" will slow it down.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 23:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-IF-Exists-not-work/m-p/306723#M1200249</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-22T23:14:23Z</dc:date>
    </item>
  </channel>
</rss>

