<?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 Loading data from a database and Qlikview's Exists() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601035#M1102723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Qlikview 11 for developers says -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Origin and Destination Airports dimension tables perform a direct query to the source database. Therefore, the Exists() function cannot be used as described here. A QlikView function might not be interpreted as expected in a direct database query. Therefore, we need to use the Left Keep prefix approach in those two cases to achieve the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I thought why not try to see this in action ! Here is my attempt. Let me know if I got it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My SQL "table", a list of people I know -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstName&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Kwok&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Meyer&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Myer&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Sánchez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Qlikview Script to load only my friends -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[MyFriends]:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FName, LName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ken,Myer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ken,Sánchez&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//List of people I know&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [long connection string] (XPassword is secret);&lt;/P&gt;&lt;P&gt;LOAD FirstName, LastName;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT FirstName, LastName&lt;/P&gt;&lt;P&gt;FROM AdventureWorks2008R2.Person.Person&lt;/P&gt;&lt;P&gt;WHERE FirstName = 'Ken' // there was a ; after this line. Its removed to add Exists() of qlikview in next line&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Exists([FirstName], [FName])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND Exists([LastName], [LName]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error on reloading script -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ErrorSource: Microsoft OLE DB Provider for SQL Server, &lt;STRONG&gt;ErrorMsg: Incorrect syntax near the keyword 'Where'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT FirstName, LastName&lt;/P&gt;&lt;P&gt;FROM AdventureWorks2008R2.Person.Person&lt;/P&gt;&lt;P&gt;WHERE FirstName = 'Ken'&lt;/P&gt;&lt;P&gt;Where Exists([FirstName], [FName])&lt;/P&gt;&lt;P&gt;AND Exists([LastName], [LName])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the reason why you cannot use qlikview's EXISTS() function to compare a field taken from a database to any other field in the script ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2014 22:32:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-21T22:32:20Z</dc:date>
    <item>
      <title>Loading data from a database and Qlikview's Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601035#M1102723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Qlikview 11 for developers says -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Origin and Destination Airports dimension tables perform a direct query to the source database. Therefore, the Exists() function cannot be used as described here. A QlikView function might not be interpreted as expected in a direct database query. Therefore, we need to use the Left Keep prefix approach in those two cases to achieve the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I thought why not try to see this in action ! Here is my attempt. Let me know if I got it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My SQL "table", a list of people I know -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstName&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Kwok&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Meyer&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Myer&lt;/P&gt;&lt;P&gt;Ken&amp;nbsp;&amp;nbsp;&amp;nbsp; Sánchez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Qlikview Script to load only my friends -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[MyFriends]:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FName, LName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ken,Myer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ken,Sánchez&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//List of people I know&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [long connection string] (XPassword is secret);&lt;/P&gt;&lt;P&gt;LOAD FirstName, LastName;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT FirstName, LastName&lt;/P&gt;&lt;P&gt;FROM AdventureWorks2008R2.Person.Person&lt;/P&gt;&lt;P&gt;WHERE FirstName = 'Ken' // there was a ; after this line. Its removed to add Exists() of qlikview in next line&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Exists([FirstName], [FName])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND Exists([LastName], [LName]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error on reloading script -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ErrorSource: Microsoft OLE DB Provider for SQL Server, &lt;STRONG&gt;ErrorMsg: Incorrect syntax near the keyword 'Where'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT FirstName, LastName&lt;/P&gt;&lt;P&gt;FROM AdventureWorks2008R2.Person.Person&lt;/P&gt;&lt;P&gt;WHERE FirstName = 'Ken'&lt;/P&gt;&lt;P&gt;Where Exists([FirstName], [FName])&lt;/P&gt;&lt;P&gt;AND Exists([LastName], [LName])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the reason why you cannot use qlikview's EXISTS() function to compare a field taken from a database to any other field in the script ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 22:32:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601035#M1102723</guid>
      <dc:creator />
      <dc:date>2014-04-21T22:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from a database and Qlikview's Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601036#M1102724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot use Where Exists with the SQL statement. You can use that only in a load statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 23:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601036#M1102724</guid>
      <dc:creator />
      <dc:date>2014-04-21T23:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from a database and Qlikview's Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601037#M1102725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I wanted to see if could demonstrate why you cannot use qlikview's WHERE EXISTS() with an SQL load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 23:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601037#M1102725</guid>
      <dc:creator />
      <dc:date>2014-04-21T23:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from a database and Qlikview's Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601038#M1102726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then what is your question?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 00:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601038#M1102726</guid>
      <dc:creator />
      <dc:date>2014-04-22T00:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from a database and Qlikview's Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601039#M1102727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question was - did I illustrate the concept correctly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 01:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601039#M1102727</guid>
      <dc:creator />
      <dc:date>2014-04-22T01:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loading data from a database and Qlikview's Exists()</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601040#M1102728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; You can say that. yes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 01:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-from-a-database-and-Qlikview-s-Exists/m-p/601040#M1102728</guid>
      <dc:creator />
      <dc:date>2014-04-22T01:10:02Z</dc:date>
    </item>
  </channel>
</rss>

