<?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 Problem with where exists statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-where-exists-statement/m-p/225830#M78095</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 have two qvd files, one with customer data and one with order data. I want to load data from a specific customer and only the orders related to that customer. I use this script which works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Hoved.qvd] (qvd)&lt;/P&gt;&lt;P&gt;&lt;B&gt;where&lt;/B&gt; [Customer Number]='104052';&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Line.qvd] (qvd)&lt;/P&gt;&lt;P&gt;&lt;B&gt;where&lt;/B&gt; exists([Order Number],[Order Number]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to do the same but only with specific payment codes but I do not know how to make the statement. The example below works with one specific payment code but how do I add more? I have tried with &lt;STRONG&gt;OR&lt;/STRONG&gt; but then it loads all orders again not the ones related to the specific customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;BR /&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Hoved.qvd] (qvd)&lt;BR /&gt;&lt;B&gt;where&lt;/B&gt; [Customer Number]='104052';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Line.qvd] (qvd)&lt;/P&gt;&lt;P&gt;&lt;B&gt;where&lt;/B&gt; exists([Order Number],[Order Number]) &lt;B&gt;and&lt;/B&gt; [Payment Code]=17;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Another question, how do I fix the sort order in list boxes so the available fields (white) comes first and not scattered around between not available fields (grey)?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jan 2010 17:40:27 GMT</pubDate>
    <dc:creator>henrikhagen</dc:creator>
    <dc:date>2010-01-28T17:40:27Z</dc:date>
    <item>
      <title>Problem with where exists statement</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-where-exists-statement/m-p/225830#M78095</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 have two qvd files, one with customer data and one with order data. I want to load data from a specific customer and only the orders related to that customer. I use this script which works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Hoved.qvd] (qvd)&lt;/P&gt;&lt;P&gt;&lt;B&gt;where&lt;/B&gt; [Customer Number]='104052';&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Line.qvd] (qvd)&lt;/P&gt;&lt;P&gt;&lt;B&gt;where&lt;/B&gt; exists([Order Number],[Order Number]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to do the same but only with specific payment codes but I do not know how to make the statement. The example below works with one specific payment code but how do I add more? I have tried with &lt;STRONG&gt;OR&lt;/STRONG&gt; but then it loads all orders again not the ones related to the specific customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;BR /&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Hoved.qvd] (qvd)&lt;BR /&gt;&lt;B&gt;where&lt;/B&gt; [Customer Number]='104052';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; [GDS DATA\Line.qvd] (qvd)&lt;/P&gt;&lt;P&gt;&lt;B&gt;where&lt;/B&gt; exists([Order Number],[Order Number]) &lt;B&gt;and&lt;/B&gt; [Payment Code]=17;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Another question, how do I fix the sort order in list boxes so the available fields (white) comes first and not scattered around between not available fields (grey)?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2010 17:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-where-exists-statement/m-p/225830#M78095</guid>
      <dc:creator>henrikhagen</dc:creator>
      <dc:date>2010-01-28T17:40:27Z</dc:date>
    </item>
  </channel>
</rss>

