<?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 syntax with sql in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930518#M649404</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;Is this complete script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Aug 2015 01:25:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-15T01:25:33Z</dc:date>
    <item>
      <title>where exists syntax with sql</title>
      <link>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930517#M649403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;I want to do&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table1:&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;a_key,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;b,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;c;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;select * from&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;......;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where not exists (a_key)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;tab2.qvd&lt;/EM&gt;&lt;/SPAN&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Or &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;a_key,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;b,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;c;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;SQL&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;select * from&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;......;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;MINUS&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;Tab2.qvd&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;but looks like syntax is wrong.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can someone help me here?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 00:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930517#M649403</guid>
      <dc:creator>rdsuperlike</dc:creator>
      <dc:date>2015-08-15T00:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: where exists syntax with sql</title>
      <link>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930518#M649404</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;Is this complete script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 01:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930518#M649404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-15T01:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: where exists syntax with sql</title>
      <link>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930519#M649405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;EM style="font-size: 10pt; line-height: 1.5em;"&gt;Table1:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;a_key,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;b,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;c;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SQL&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;select * from&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;......;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;where not exists (a_key)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;from &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;EM&gt;tab2.qvd&lt;/EM&gt;&lt;/SPAN&gt;;&lt;/EM&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to load data from SQL where a_key is null? Is that the intention here???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 02:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930519#M649405</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-15T02:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: where exists syntax with sql</title>
      <link>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930520#M649406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You couldn't apply a exists() to a sql-statement because it's a qv function. Commonly used in such cases is &lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt;. Another possibilities are to load the sql-table complete and apply then a second load with an exists() filter - see also: &lt;A href="https://community.qlik.com/docs/DOC-7020"&gt;The exists issue&lt;/A&gt; - or using a join/keep to filter your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your sql-load is quite large it could be useful to convert the exists-logic in a sql-function like &lt;A href="http://www.techonthenet.com/sql/in.php" title="http://www.techonthenet.com/sql/in.php"&gt;SQL: IN Condition&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 09:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930520#M649406</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-15T09:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: where exists syntax with sql</title>
      <link>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930521#M649407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should load Table2.qvd and after that the LOAD with exists previous to the SQL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;EM&gt;Table2&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a_key,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;
&lt;P&gt;FROM Table2.qvd(qvd);&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SQL_Table:&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a_key, b, c&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;where exists&lt;/STRONG&gt;(a_key, a_key)&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SQL SELECT * FROM Table;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Aug 2015 16:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-exists-syntax-with-sql/m-p/930521#M649407</guid>
      <dc:creator />
      <dc:date>2015-08-16T16:15:56Z</dc:date>
    </item>
  </channel>
</rss>

