<?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: Database 'where condition' problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Database-where-condition-problem/m-p/372630#M1170512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I reformatted your where clause for better understanding:&lt;/P&gt;&lt;P&gt;Where &lt;/P&gt;&lt;P&gt;(ILDCT = 'IC' and ILTRDJ &amp;gt; 110365) or &lt;/P&gt;&lt;P&gt;(ILDCT = 'RI' and ILTRDJ &amp;gt; 110365) or &lt;/P&gt;&lt;P&gt;(ILDCT = 'OV' and ILTRDJ &amp;gt; 110365)&lt;/P&gt;&lt;P&gt;; &lt;/P&gt;&lt;P&gt;It should work as expected: Fetch all records with OrderDate &amp;gt; 31.12.2010 and having one of the three ILDCT-Values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;I do not think that this is a poorly SQL-Where Clause. The database will parse it and generate a query plan (means to translate it into DB-internal code and modules) and execute it once(!). An equivalent expression would be:&lt;/P&gt;&lt;P&gt;Where &lt;/P&gt;&lt;P&gt;(ILDCT = 'IC'&amp;nbsp; or&amp;nbsp; ILDCT = 'RI'&amp;nbsp; or ILDCT = 'OV') and ILTRDJ &amp;gt; 110365&lt;/P&gt;&lt;P&gt;; &lt;/P&gt;&lt;P&gt;But as mentioned above, both should work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Are you sure that you got records with "ILTRDJ &amp;gt; 110365" in your table ?!? I would check this with a simple "Where ILTRDJ &amp;gt; 110365". &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GooD LucK&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jul 2012 09:06:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-28T09:06:56Z</dc:date>
    <item>
      <title>Database 'where condition' problem</title>
      <link>https://community.qlik.com/t5/QlikView/Database-where-condition-problem/m-p/372629#M1170511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I recently started a new project in which I am using Qlikview to more aesthetically display some databased information. I am trying to create a history of inventory using historical invoice and workorder inputs. This is the first ime I have ever used QlikView and am really struggling with specifying the data in the where conditions. I am only trying to view three document types within the DB (IC,RI and OV) from the beginning of 2011 to current. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;This is what i have so far:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ODBC &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;CONNECT to JDE&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ItemLedger:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Document Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILMCU&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Business Unit]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILICU&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Batch Number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDCTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Order Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDOCO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Order Number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;IsNum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILLITM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILLITM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;As&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Item Number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;gt;5,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1900 + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1) * 100) + &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),2,2)) + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),3) - 1)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt; 0 ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1000 + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1) * 100) + &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1,2)) + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(+&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILDGL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),3) - 1)), &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Null&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())) &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[G/L Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILLNID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/1000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Line Number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Len&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;gt;5,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1900 + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1) * 100) + &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),2,2)) + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),3) - 1)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt; 0 ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;MakeDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1000 + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1) * 100) + &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;mid&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1,2)) + (&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;right&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(+&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;text&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRDJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),3) - 1)), &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Null&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;())) &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Order Date]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILUNCS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/10000 &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Unit Cost]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILLOCN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTRQT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/10000) &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Transaction Quantity]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILTREX&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Explanation]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ILPAID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;/100 &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;[Extended Cost/Price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 8pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ILDCT, ILMCU, ILICU, ILDCTO, ILDOCO, ILLITM, ILDGL, ILLNID, ILTRDJ, ILUNCS, ILLOCN, ILTRQT, ILTREX, ILPAID&lt;BR /&gt;FROM "JDE_PRODUCTION".PRODDTA.F4111&lt;BR /&gt;Where ILDCT = 'IC'&lt;BR /&gt;and ILTRDJ &amp;gt; 110365&lt;BR /&gt;or ILDCT = 'RI'&lt;BR /&gt;and ILTRDJ &amp;gt; 110365&lt;BR /&gt;or ILDCT = 'OV'&lt;BR /&gt;and ILTRDJ &amp;gt; 110365; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;The Problem I'm having is that even if i 'debug' 150,000 lines from the DB im still only getting 1 month of data (Jan 2011). I feel like this might be due to the poorly constructed 'where' statement. If i think about it logically, I believe it has to read through the DB three times to meet my criteria. I haven't been able to discover a method for filtering the data other than in the 'where' statement. Any feedback or help would be greatly appriciated, as I am very new to QlikView and struggling! Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 23:34:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Database-where-condition-problem/m-p/372629#M1170511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-27T23:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Database 'where condition' problem</title>
      <link>https://community.qlik.com/t5/QlikView/Database-where-condition-problem/m-p/372630#M1170512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I reformatted your where clause for better understanding:&lt;/P&gt;&lt;P&gt;Where &lt;/P&gt;&lt;P&gt;(ILDCT = 'IC' and ILTRDJ &amp;gt; 110365) or &lt;/P&gt;&lt;P&gt;(ILDCT = 'RI' and ILTRDJ &amp;gt; 110365) or &lt;/P&gt;&lt;P&gt;(ILDCT = 'OV' and ILTRDJ &amp;gt; 110365)&lt;/P&gt;&lt;P&gt;; &lt;/P&gt;&lt;P&gt;It should work as expected: Fetch all records with OrderDate &amp;gt; 31.12.2010 and having one of the three ILDCT-Values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;I do not think that this is a poorly SQL-Where Clause. The database will parse it and generate a query plan (means to translate it into DB-internal code and modules) and execute it once(!). An equivalent expression would be:&lt;/P&gt;&lt;P&gt;Where &lt;/P&gt;&lt;P&gt;(ILDCT = 'IC'&amp;nbsp; or&amp;nbsp; ILDCT = 'RI'&amp;nbsp; or ILDCT = 'OV') and ILTRDJ &amp;gt; 110365&lt;/P&gt;&lt;P&gt;; &lt;/P&gt;&lt;P&gt;But as mentioned above, both should work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Are you sure that you got records with "ILTRDJ &amp;gt; 110365" in your table ?!? I would check this with a simple "Where ILTRDJ &amp;gt; 110365". &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GooD LucK&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jul 2012 09:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Database-where-condition-problem/m-p/372630#M1170512</guid>
      <dc:creator />
      <dc:date>2012-07-28T09:06:56Z</dc:date>
    </item>
  </channel>
</rss>

