<?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 Direct Query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Direct-Query/m-p/552632#M206439</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;Quick question : with using Direct query, is there another way to create a different condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In tech doc, it explains that when you select 10 id of customer ID, Qlikview creates this SQL :&lt;/P&gt;&lt;P&gt;SELECT DISTINCT "SalesPersonID" FROM "AdventureWorks"."Sales"."SalesOrderHeader" WHERE&lt;/P&gt;&lt;P&gt;"CustomerID" IN ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you have 10 000 customerID selected you have this SQL&lt;/P&gt;&lt;P&gt;SELECT DISTINCT "SalesPersonID" FROM "AdventureWorks"."Sales"."SalesOrderHeader" WHERE&lt;/P&gt;&lt;P&gt;"CustomerID" IN ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .. 10000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it's not performant for a SQL Server, it will be more performant with this SQL&lt;/P&gt;&lt;P&gt;SELECT DISTINCT "SalesPersonID" FROM "AdventureWorks"."Sales"."SalesOrderHeader" WHERE&lt;/P&gt;&lt;P&gt;"CustomerID" &amp;gt; 1&lt;/P&gt;&lt;P&gt;and "CustomerID" &amp;lt; 10001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jan 2014 16:25:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-22T16:25:43Z</dc:date>
    <item>
      <title>Direct Query</title>
      <link>https://community.qlik.com/t5/QlikView/Direct-Query/m-p/552632#M206439</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;Quick question : with using Direct query, is there another way to create a different condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In tech doc, it explains that when you select 10 id of customer ID, Qlikview creates this SQL :&lt;/P&gt;&lt;P&gt;SELECT DISTINCT "SalesPersonID" FROM "AdventureWorks"."Sales"."SalesOrderHeader" WHERE&lt;/P&gt;&lt;P&gt;"CustomerID" IN ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you have 10 000 customerID selected you have this SQL&lt;/P&gt;&lt;P&gt;SELECT DISTINCT "SalesPersonID" FROM "AdventureWorks"."Sales"."SalesOrderHeader" WHERE&lt;/P&gt;&lt;P&gt;"CustomerID" IN ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .. 10000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it's not performant for a SQL Server, it will be more performant with this SQL&lt;/P&gt;&lt;P&gt;SELECT DISTINCT "SalesPersonID" FROM "AdventureWorks"."Sales"."SalesOrderHeader" WHERE&lt;/P&gt;&lt;P&gt;"CustomerID" &amp;gt; 1&lt;/P&gt;&lt;P&gt;and "CustomerID" &amp;lt; 10001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 16:25:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Direct-Query/m-p/552632#M206439</guid>
      <dc:creator />
      <dc:date>2014-01-22T16:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query</title>
      <link>https://community.qlik.com/t5/QlikView/Direct-Query/m-p/552633#M206440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add FIRST before the LOAD statement, maybe like below, it will only load the first 10 rows from the Database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-01-22_1641.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/51921_2014-01-22_1641.png" /&gt;&lt;/P&gt;&lt;P&gt;You could say FIRST 10000 and then ORDER BY CustomerID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 17:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Direct-Query/m-p/552633#M206440</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2014-01-22T17:28:42Z</dc:date>
    </item>
  </channel>
</rss>

