<?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: Direct Query failure with big dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Direct-Query-failure-with-big-dimension/m-p/612346#M1119665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Hi Thibault,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;I answered to you by mail but I'm posting my reply here so that everyone can see it :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;There is no workaround on the Oracle side : the limit of 1000 occurences in a IN clause is hardcoded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Your only solution is to change the way you query Oracle : you could create a view in your database that FULL OUTER JOINs your Fact and Employee tables on the Employee Id leaving you with the following Direct Query :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue;"&gt;DIRECT QUERY&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;DIMENSION&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StoreID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;MEASURE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="FR" style="line-height: 1.5em; font-size: 8pt; font-family: 'Courier New'; color: blue;"&gt;FROM FactView;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"&gt;The generated SQL query should then look like the following :&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;SELECT EmployeeID, sum(Amount) FROM FactTable WHERE StoreID IN (ID1, ID2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="line-height: 1.5em; color: #575757; font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"&gt;Thus solving your problem&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: #575757; font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: #575757; font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"&gt;Loic&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2014 10:44:14 GMT</pubDate>
    <dc:creator>lft</dc:creator>
    <dc:date>2014-02-06T10:44:14Z</dc:date>
    <item>
      <title>Direct Query failure with big dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Direct-Query-failure-with-big-dimension/m-p/612345#M1119664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the sake of clarity let's say I have a very simple star schema with one dimension and one fact table. My dimension represents the employees and the store they belong to :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;StoreID &amp;lt; EmployeeID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fact table represent the sales acheived by the employees with the schema &lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;('SaleID', 'EmployeeID', 'Amount')&lt;/SPAN&gt;. Of course I have a huge amount of facts it's why I want to use Direct Discovery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem comes from the fact that one store has generally more than a thousand of employees. I have the folowwing script :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;DIRECT QUERY &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;DIMENSION&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;MEASURE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;FROM FactTable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;[Employees]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StoreID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;FROM [Employees.QVD] (qvd)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;I want to display the top 10 employees for a specific store picked up by the user. But when a store is selected, the application crash with the following error (from QV logs) : &lt;EM&gt;"ORA-01795: maximum number of expressions in a list is 1000"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Actually it gives the impression that QV generates a query like :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;&lt;SPAN style="color: #0000ff;"&gt;SELECT EmployeeID, sum(Amount) FROM FactTable WHERE EmployeeID IN (ID1, ID2, ID3, ............, IDXXXXX)&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And Oracle doesn't like it too much....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does somebody know a workaround ??&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, 05 Feb 2014 16:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Direct-Query-failure-with-big-dimension/m-p/612345#M1119664</guid>
      <dc:creator />
      <dc:date>2014-02-05T16:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Query failure with big dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Direct-Query-failure-with-big-dimension/m-p/612346#M1119665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Hi Thibault,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;I answered to you by mail but I'm posting my reply here so that everyone can see it :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;There is no workaround on the Oracle side : the limit of 1000 occurences in a IN clause is hardcoded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma, arial, helvetica, sans-serif;"&gt;Your only solution is to change the way you query Oracle : you could create a view in your database that FULL OUTER JOINs your Fact and Employee tables on the Employee Id leaving you with the following Direct Query :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue;"&gt;DIRECT QUERY&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;DIMENSION&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'Courier New'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StoreID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;MEASURE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN lang="FR" style="line-height: 1.5em; font-size: 8pt; font-family: 'Courier New'; color: blue;"&gt;FROM FactView;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"&gt;The generated SQL query should then look like the following :&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;SELECT EmployeeID, sum(Amount) FROM FactTable WHERE StoreID IN (ID1, ID2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="line-height: 1.5em; color: #575757; font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"&gt;Thus solving your problem&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: #575757; font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: #575757; font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 8.5pt; line-height: 1.5em;"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"&gt;Loic&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 10:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Direct-Query-failure-with-big-dimension/m-p/612346#M1119665</guid>
      <dc:creator>lft</dc:creator>
      <dc:date>2014-02-06T10:44:14Z</dc:date>
    </item>
  </channel>
</rss>

