<?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 Adding WHERE clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204014#M61105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;/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;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;This is the code that does not work. The data is from SAP B1 if it makes a difference.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;when the DocDate is selected it appears as 5/1/2009 12:00:00 AM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;ODBC&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;CONNECT&lt;/B&gt; &lt;B&gt;TO&lt;/B&gt; &lt;P&gt;SAP;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;SELECT&lt;/B&gt; &lt;P&gt;CardCode,&lt;/P&gt;&lt;P&gt;CardName,&lt;/P&gt;&lt;P&gt;DocDate,&lt;/P&gt;&lt;P&gt;DocEntry,&lt;/P&gt;&lt;P&gt;DocNum,&lt;/P&gt;&lt;P&gt;"Indicator"&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BIHProduction.dbo.OINV;&lt;/P&gt;&lt;P&gt;Where DocDate &amp;gt; '6/30/2009';&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2009 04:18:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-01T04:18:57Z</dc:date>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204009#M61100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a specific place I can find documentation on how to add a WHERE clause.&lt;/P&gt;&lt;P&gt;I have a table OINV with a field DocDate.&lt;/P&gt;&lt;P&gt;I only want records with a DocDate &amp;gt;6/30/2009&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204009#M61100</guid>
      <dc:creator />
      <dc:date>2009-10-01T02:19:04Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204010#M61101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Extend the LOAD?SELEC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/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;/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;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;P style="font-weight: bold"&gt;field1,&lt;/P&gt;&lt;P style="font-weight: bold"&gt;field2&lt;/P&gt;&lt;P style="font-weight: bold"&gt;...&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;fieldn&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;xx.QVD (qvd &lt;P&gt;)&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;where&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;fleild1='AU' &lt;P&gt;;&lt;/P&gt;&lt;P&gt;Just search the help. U'll get examples.&lt;/P&gt;&lt;P&gt;-Arun&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204010#M61101</guid>
      <dc:creator />
      <dc:date>2009-10-01T02:37:24Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204011#M61102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi katywall,&lt;/P&gt;&lt;P&gt;welcome to the community.&lt;BR /&gt;Now back to crude reality!&lt;/P&gt;&lt;P&gt;(note the rhymes &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; - sorry, I'm a little infantile)&lt;/P&gt;&lt;P&gt;Well, the specific places are&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the database (data source) documentation and&lt;/LI&gt;&lt;LI&gt;the Qlik View Reference&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I always emphasize these two in this respect because there is always a confusion about LOAD and QlikView functions and SELECT and database functions.&lt;/P&gt;&lt;P&gt;But actually a WHERE should work with LOAD as well as with SELECT, so it would be better to post the code in question.&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204011#M61102</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2009-10-01T02:37:25Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204012#M61103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can bring up the help file and look for "where" on the index. It has information for both LOAD and SQL statements.&lt;/P&gt;&lt;P&gt;However, you may run into a further difficulty that a lot of people have. The two dates being compared in the "where" MUST have the same format, or it won't work properly, even though it may not report an error.&lt;/P&gt;&lt;P&gt;If, for example, your database stores the date as an integer like 20090630, and you put the WHERE clause in your SQL, you would need to say "where DocDate &amp;gt; 20090630". Or maybe you're loading from a QVD that used QlikView's internal date format. In that case, you would need to compare it to a QlikView date, such as "where DocDate &amp;gt; date#(20090630,'YYYYMMDD')". In either case, just saying "where DocDate &amp;gt; 6/30/2009" wouldn't work. Just something to be aware of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204012#M61103</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-01T02:38:12Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204013#M61104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.. sorry, I forgot of course ;-))&lt;/P&gt;&lt;P&gt;3. John Witherspoon ...... it's always worth reading his (sometimes extensive but the more informative) answers ... and I love his decent hint "bring up the help file" ...... ;-))&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 02:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204013#M61104</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2009-10-01T02:50:44Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204014#M61105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;/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;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;This is the code that does not work. The data is from SAP B1 if it makes a difference.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;when the DocDate is selected it appears as 5/1/2009 12:00:00 AM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;ODBC&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;CONNECT&lt;/B&gt; &lt;B&gt;TO&lt;/B&gt; &lt;P&gt;SAP;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;SELECT&lt;/B&gt; &lt;P&gt;CardCode,&lt;/P&gt;&lt;P&gt;CardName,&lt;/P&gt;&lt;P&gt;DocDate,&lt;/P&gt;&lt;P&gt;DocEntry,&lt;/P&gt;&lt;P&gt;DocNum,&lt;/P&gt;&lt;P&gt;"Indicator"&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BIHProduction.dbo.OINV;&lt;/P&gt;&lt;P&gt;Where DocDate &amp;gt; '6/30/2009';&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 04:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204014#M61105</guid>
      <dc:creator />
      <dc:date>2009-10-01T04:18:57Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204015#M61106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect you don't want the semicolon after BIHProduction.dbo.OINV, but I don't do any SAP, so can't say for sure what that SQL implementation looks like. I also suspect that you're having the date format problem I mentioned. By putting it in quotes, you're specifying a text format for the date. Your database is almost certainly NOT storing the DocDates as text. You need to figure out what format it is using, and use the same format in the comparison.&lt;/P&gt;&lt;P&gt;I would suggest testing the SQL outside of QlikView. I suspect it won't work, and that this therefore isn't a QlikView issue. If I'm right, first get it working outside of QlikView. Only copy it to QlikView when you have it working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 04:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204015#M61106</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-01T04:30:09Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204016#M61107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it, Thanks&lt;/P&gt;&lt;P&gt;For any SAP B1 users.&lt;/P&gt;&lt;P&gt;Where DocDate &amp;gt;={ts'2009-06-30 00:00:01'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2009 18:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204016#M61107</guid>
      <dc:creator />
      <dc:date>2009-10-01T18:52:23Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204017#M61108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I thought I had it.&lt;/P&gt;&lt;P&gt;That works in one table but in a different database I need between 2 dates.&lt;/P&gt;&lt;P&gt;Where "invoice_date" &amp;gt;={ts '2007-11-01 00:00:01};&lt;/P&gt;&lt;P&gt;work great but adding&lt;/P&gt;&lt;P&gt;Where "invoice_date" &amp;gt;={ts '2007-11-01 00:00:01}&lt;/P&gt;&lt;P&gt;and "invoice_date" &amp;lt; {ts '2009-06-30 00:00:00};&lt;/P&gt;&lt;P&gt;does not.&lt;/P&gt;&lt;P&gt;Thanks again for any assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 00:38:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204017#M61108</guid>
      <dc:creator />
      <dc:date>2009-10-02T00:38:23Z</dc:date>
    </item>
    <item>
      <title>Adding WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204018#M61109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't enclose the strings properly between apostrophes - at least in the examples you posted here ( e.g. {ts '2007-11-01 00:00:01} ). Perhaps that's the rather unspectacular reason. That's all I can contribute for now.&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2009 00:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-WHERE-clause/m-p/204018#M61109</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2009-10-02T00:42:22Z</dc:date>
    </item>
  </channel>
</rss>

