<?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 where field between variable and variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148662#M26933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the values of the variables STARTDATE and ENDDATE? What is the format of GoodDate in the data? It would seem there is a mismatch.&lt;/P&gt;&lt;P&gt;If STARTDATE and ENDDATE are dates in the format DD-MM-YYYY then you need to format them for the where condition:&lt;/P&gt;&lt;P&gt;WHERE date(GoodDate, 'DD-MM-YYYY) &amp;gt;= $(STARTDATE) and&lt;/P&gt;&lt;P&gt;date(GoodDate, 'DD-MM-YYYY) &amp;lt;= $(ENDDATE)&lt;/P&gt;&lt;P&gt;If this resolves the problem you might also want to consider a 'preceeding load' to keep things tidier.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jul 2009 17:08:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-07T17:08:59Z</dc:date>
    <item>
      <title>where field between variable and variable</title>
      <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148659#M26930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to load data between two predefined dates in the script.&lt;/P&gt;&lt;P&gt;I have the following code but something does not work properly in the where clausule:&lt;/P&gt;&lt;P&gt;//************************************************&lt;BR /&gt;DATE_MAP:&lt;BR /&gt;MAPPING&lt;BR /&gt; LOAD&lt;BR /&gt;date&lt;BR /&gt;date(GoodDate, 'DD-MM-YYYY') as Date&lt;BR /&gt;FROM ...........&lt;BR /&gt;WHERE GoodDate &amp;gt;= $(STARTDATE) and&lt;BR /&gt; GoodDate &amp;gt;= $(ENDDATE);&lt;/P&gt;&lt;P&gt;Any suggestions? thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 15:25:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148659#M26930</guid>
      <dc:creator />
      <dc:date>2009-07-07T15:25:35Z</dc:date>
    </item>
    <item>
      <title>where field between variable and variable</title>
      <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148660#M26931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should you comparison tests be &amp;gt;= $(STARTDATE) and &amp;lt;= $(ENDDATE) ?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 16:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148660#M26931</guid>
      <dc:creator />
      <dc:date>2009-07-07T16:36:39Z</dc:date>
    </item>
    <item>
      <title>where field between variable and variable</title>
      <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148661#M26932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;of course enddate is &amp;lt;= ......little copy paste mistake ;-)) ...&lt;/P&gt;&lt;P&gt;the original looks like that but when I reload zero lines will fetch while I'm sure there are over 3000 records between the start and enddate.&lt;/P&gt;&lt;P&gt;//************************************************&lt;BR /&gt;DATE_MAP:&lt;BR /&gt;MAPPING&lt;BR /&gt; LOAD&lt;BR /&gt;date&lt;BR /&gt;date(GoodDate, 'DD-MM-YYYY') as Date&lt;BR /&gt;FROM ...........&lt;BR /&gt;WHERE GoodDate &amp;gt;= $(STARTDATE) and&lt;BR /&gt; GoodDate &amp;lt;= $(ENDDATE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 16:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148661#M26932</guid>
      <dc:creator />
      <dc:date>2009-07-07T16:54:07Z</dc:date>
    </item>
    <item>
      <title>where field between variable and variable</title>
      <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148662#M26933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the values of the variables STARTDATE and ENDDATE? What is the format of GoodDate in the data? It would seem there is a mismatch.&lt;/P&gt;&lt;P&gt;If STARTDATE and ENDDATE are dates in the format DD-MM-YYYY then you need to format them for the where condition:&lt;/P&gt;&lt;P&gt;WHERE date(GoodDate, 'DD-MM-YYYY) &amp;gt;= $(STARTDATE) and&lt;/P&gt;&lt;P&gt;date(GoodDate, 'DD-MM-YYYY) &amp;lt;= $(ENDDATE)&lt;/P&gt;&lt;P&gt;If this resolves the problem you might also want to consider a 'preceeding load' to keep things tidier.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 17:08:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148662#M26933</guid>
      <dc:creator />
      <dc:date>2009-07-07T17:08:59Z</dc:date>
    </item>
    <item>
      <title>where field between variable and variable</title>
      <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148663#M26934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Depending on the values that you have, you may simply need some single quotes on the dates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;DATE_MAP:&lt;BR /&gt;MAPPING&lt;BR /&gt; LOAD&lt;BR /&gt;date&lt;BR /&gt;date(GoodDate, 'DD-MM-YYYY') as Date&lt;BR /&gt;FROM ...........&lt;BR /&gt;WHERE GoodDate &amp;gt;= '$(STARTDATE)' and&lt;BR /&gt; GoodDate &amp;lt;= '$(ENDDATE)';&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 17:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148663#M26934</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2009-07-07T17:39:02Z</dc:date>
    </item>
    <item>
      <title>where field between variable and variable</title>
      <link>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148664#M26935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, single quotes around the startdate and enddate did the trick..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2009 17:51:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-field-between-variable-and-variable/m-p/148664#M26935</guid>
      <dc:creator />
      <dc:date>2009-07-07T17:51:41Z</dc:date>
    </item>
  </channel>
</rss>

