<?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: Where Exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852590#M298937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in principle, it is easy.&lt;/P&gt;&lt;P&gt;- You load your ORDERS table first.&lt;/P&gt;&lt;P&gt;- Then you load your SHIPMENTS table and you just attached a clause like&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt; WHERE EXISTS(Key_Order) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; to your LOAD statement (in front of the closing semicolon)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In principle, if the field has the same name in both tables, you can thus write this with only one parameter&lt;BR /&gt;&amp;lt;=&amp;gt; This can be tricky, so I would advise you rename one of those fields (the one in the table loaded first, the ORDER table) to sth like &amp;gt;&amp;gt; Key_Order_v1 &amp;lt;&amp;lt; and then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write the clause like&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt; WHERE EXISTS(Key_Order_v1, Key_Order) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;(you can rename it back afterwards if you want with the RENAME FIELD function).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 14:03:34 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2015-05-13T14:03:34Z</dc:date>
    <item>
      <title>Where Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852586#M298933</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;In my script, I am loading in 2 tables from QVDs - Orders and Shipments. In both of these tables there is a field called Key_Order, so the 2 tables are linked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to load in Order first and then only load the records from Shipment where the Key_Order already exists in Orders. So if for example there is a record in Shipments where the Key_Order is ABCDE, but there is no corresponding record in Order, this should not be loaded in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about doing this using a left join, but I want to keep the 2 tables separate as I'll have to make a lot of changes to everythgin else in my report if I join them together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I have to use 'where exists', but I 'm not sure how to use this and can't find any examples in the community that I can make any sense of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852586#M298933</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2015-05-13T13:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852587#M298934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Danielle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just use in the second table where exists(Key_Order) it will understand that it is being referred to the previously referred table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852587#M298934</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2015-05-13T13:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852588#M298935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Data,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Key_Order,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Key_Order as ExistKey&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;From&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Table2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Data2&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Key_Order,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;From&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Table2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; where Exists(ExistKey,Key_Order);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:00:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852588#M298935</guid>
      <dc:creator />
      <dc:date>2015-05-13T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852589#M298936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Danielle, in example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order:&lt;/P&gt;&lt;P&gt;LOAD ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key_Order&lt;/P&gt;&lt;P&gt;FROM ...&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shipment:&lt;/P&gt;&lt;P&gt;LOAD ....&lt;/P&gt;&lt;P&gt;FROM ...&lt;/P&gt;&lt;P&gt;Where Exists('Key_Order', Key_Order);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the 'Exists' function the first 'Key_Order' is the field already loaded in QV, the 2nd 'Key_Order' is the field in the shipment qvd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852589#M298936</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-05-13T14:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852590#M298937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in principle, it is easy.&lt;/P&gt;&lt;P&gt;- You load your ORDERS table first.&lt;/P&gt;&lt;P&gt;- Then you load your SHIPMENTS table and you just attached a clause like&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt; WHERE EXISTS(Key_Order) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; to your LOAD statement (in front of the closing semicolon)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In principle, if the field has the same name in both tables, you can thus write this with only one parameter&lt;BR /&gt;&amp;lt;=&amp;gt; This can be tricky, so I would advise you rename one of those fields (the one in the table loaded first, the ORDER table) to sth like &amp;gt;&amp;gt; Key_Order_v1 &amp;lt;&amp;lt; and then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write the clause like&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt; WHERE EXISTS(Key_Order_v1, Key_Order) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;(you can rename it back afterwards if you want with the RENAME FIELD function).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852590#M298937</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-05-13T14:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852591#M298938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks All, I appreciate your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All really helpful answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 15:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists/m-p/852591#M298938</guid>
      <dc:creator>danielle_v</dc:creator>
      <dc:date>2015-05-13T15:10:44Z</dc:date>
    </item>
  </channel>
</rss>

