<?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: QVW Load Statement Where Clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566092#M685300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Alec,&lt;/P&gt;&lt;P&gt;You have to use 'Where Exists' statement.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Load JrnlHdr table first and use your filters. So that table is now filtered&lt;/LI&gt;&lt;LI&gt;Then load the remaining three tables with Where exists and JrnlRow should be the second table to be loaded in your script.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;eg; Load * From JrnlRow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where Exists(PostOrder);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load * From Products&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where Exists(ItemRecordNumber);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will reduce the data with respect to the very first filter.&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Feb 2014 22:24:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-10T22:24:08Z</dc:date>
    <item>
      <title>QVW Load Statement Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566091#M685299</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 have four separate taps that each contain a separate load statement (see first screen shot). I am trying to add a WHERE clause on the JrnlHdr load statement (i.e. WHERE JrnlHdr.JrnlKey_Journal IN (3,5,11) and have it apply to all of the other load statements (see data model screen shot).&amp;nbsp; When I add the WHERE clause to the "JrnlHdr" load statement, the other load statements do not reduce the number of fetched records as expected.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any assistance.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-02-10 at 1.39.33 PM.png" class="jive-image" src="/legacyfs/online/52906_Screen Shot 2014-02-10 at 1.39.33 PM.png" style="width: 620px; height: 748px;" /&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Data Model 2.png" class="jive-image" src="/legacyfs/online/52910_Data Model 2.png" style="width: 620px; height: 222px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 21:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566091#M685299</guid>
      <dc:creator>asmithids</dc:creator>
      <dc:date>2014-02-10T21:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: QVW Load Statement Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566092#M685300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Alec,&lt;/P&gt;&lt;P&gt;You have to use 'Where Exists' statement.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Load JrnlHdr table first and use your filters. So that table is now filtered&lt;/LI&gt;&lt;LI&gt;Then load the remaining three tables with Where exists and JrnlRow should be the second table to be loaded in your script.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;eg; Load * From JrnlRow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where Exists(PostOrder);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load * From Products&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where Exists(ItemRecordNumber);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will reduce the data with respect to the very first filter.&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 22:24:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566092#M685300</guid>
      <dc:creator />
      <dc:date>2014-02-10T22:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: QVW Load Statement Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566093#M685301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you AJ!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the Where Exists to the JrnlRow load statement (see screen shot).&amp;nbsp; However, when I run the reload, I get the second screen shot error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again, &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-02-10 at 6.36.46 PM.png" class="jive-image" src="/legacyfs/online/52912_Screen Shot 2014-02-10 at 6.36.46 PM.png" style="width: 620px; height: 556px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2014-02-10 at 6.40.04 PM.png" class="jive-image" src="/legacyfs/online/52916_Screen Shot 2014-02-10 at 6.40.04 PM.png" style="width: 620px; height: 383px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 23:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566093#M685301</guid>
      <dc:creator>asmithids</dc:creator>
      <dc:date>2014-02-10T23:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: QVW Load Statement Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566094#M685302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Smith, you can't use the Qlikview functions in the SQL statements in the script. I believe, you are using the AJ suggested method on SQL statements and so you got the error. So please use Match function in the precedent Load like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customers:&lt;/P&gt;&lt;P&gt;LOAD * &lt;STRONG&gt;Where Match(JmlHdr,3,5,11)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT field1,&lt;/P&gt;&lt;P&gt;field2,&lt;/P&gt;&lt;P&gt;field3,&lt;/P&gt;&lt;P&gt;field4&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;From Customers;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can use SQL IN function in the SQL statement like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customers:&lt;/P&gt;&lt;P&gt;SQL SELECT field1,&lt;/P&gt;&lt;P&gt;field2,&lt;/P&gt;&lt;P&gt;field3,&lt;/P&gt;&lt;P&gt;field4&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;From Customers &lt;STRONG&gt;Where JmlHdr IN (3,5,11)&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use either of method&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 00:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566094#M685302</guid>
      <dc:creator />
      <dc:date>2014-02-11T00:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: QVW Load Statement Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566095#M685303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dathu.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 00:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVW-Load-Statement-Where-Clause/m-p/566095#M685303</guid>
      <dc:creator>asmithids</dc:creator>
      <dc:date>2014-02-11T00:50:38Z</dc:date>
    </item>
  </channel>
</rss>

