<?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: Not working Where condition by using variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245079#M93438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel, Thanks for reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not assigning the variable inside the EditScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assigned variables outside the EditScript i.e; In DocumentProperties --&amp;gt; Variables&amp;nbsp; i.e; the variables are getting&amp;nbsp; from another QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vStartDt = '07-07-2007 00:00:01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vEndDt = '07-09-2009 00:00:15'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Aug 2011 10:19:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-03T10:19:25Z</dc:date>
    <item>
      <title>Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245074#M93433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my QVW file, taken two variables with "DateTime" data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MM-DD-YYYY hh:mm:ss&lt;/P&gt;&lt;P&gt;vStartDt = '07-07-2007 00:00:01'&lt;/P&gt;&lt;P&gt;vEndDt = '07-09-2009 00:00:15'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in editscript writing where condition &lt;STRONG&gt;where CaptureDateTime &amp;gt;&amp;nbsp; $(vStartDt) and CaptureDateTime &amp;lt; $(vEndDt),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but it is not fetching any data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While loading the script it is not fetching any data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any mistake in providing a value to variables or any mistake in where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 09:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245074#M93433</guid>
      <dc:creator />
      <dc:date>2011-08-03T09:03:07Z</dc:date>
    </item>
    <item>
      <title>Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245075#M93434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; write variable in single quote&lt;/P&gt;&lt;P&gt;CaptureDateTime &amp;lt; '$(vEndDt)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this may help u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 09:04:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245075#M93434</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-08-03T09:04:28Z</dc:date>
    </item>
    <item>
      <title>Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245076#M93435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write like this:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where CaptureDateTime &amp;gt;&amp;nbsp; '$(vStartDt)' and CaptureDateTime &amp;lt; '$(vEndDt)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:- Write variable within single quote(' ').&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 09:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245076#M93435</guid>
      <dc:creator />
      <dc:date>2011-08-03T09:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245077#M93436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried what you said, but it is generating an error i.e; Garabage After Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vStartDt = '07-07-2007 00:00:01'&lt;/P&gt;&lt;P&gt;vEndDt = '07-09-2009 00:00:15'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where CaptureDateTime &amp;gt;&amp;nbsp; '$(vStartDt)' and CaptureDateTime &amp;lt; '$(vEndDt)'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 09:40:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245077#M93436</guid>
      <dc:creator />
      <dc:date>2011-08-03T09:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245078#M93437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you loading your variables with LET or with SET ? Are you quoting them when assigning to the variable? Has CaptureDateTime the same exact format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following working example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;SET vStartDt = '07/07/2007 00:00:01';&lt;/P&gt;&lt;P&gt;SET vEndDt = '07/09/2009 00:00:15';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;ID, CaptureDateTime&lt;/P&gt;&lt;P&gt;A, 07/07/2007 00:00:01&lt;/P&gt;&lt;P&gt;B, 07/09/2009 00:00:15&lt;/P&gt;&lt;P&gt;C, 07/09/2009 00:00:16&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;WHERE CaptureDateTime &amp;gt;= '$(vStartDt)' AND CaptureDateTime &amp;lt;= '$(vEndDt)';&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 10:06:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245078#M93437</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-03T10:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245079#M93438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel, Thanks for reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not assigning the variable inside the EditScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assigned variables outside the EditScript i.e; In DocumentProperties --&amp;gt; Variables&amp;nbsp; i.e; the variables are getting&amp;nbsp; from another QVW file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vStartDt = '07-07-2007 00:00:01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vEndDt = '07-09-2009 00:00:15'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 10:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245079#M93438</guid>
      <dc:creator />
      <dc:date>2011-08-03T10:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245080#M93439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then that's the problem. If you are quoting the values in the Settings menu, Variable Overview, you don't need to quote them again in the WHERE statement, otherwise the "garbage after statement" error shows up. Remove the quotes in the values using the Variable Overview menu or in the WHERE and you get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;WHERE CaptureDateTime &amp;gt;= $(vStartDt) AND CaptureDateTime &amp;lt;= $(vEndDt);&lt;/CODE&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; text-decoration: underline; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 10:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245080#M93439</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-03T10:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245081#M93440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel, sorry for late reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried that also but not getting the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached the sample file and qvd. Pls check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 11:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245081#M93440</guid>
      <dc:creator />
      <dc:date>2011-08-03T11:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Not working Where condition by using variables</title>
      <link>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245082#M93441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;LOAD CaptureDateTime&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;SampleDate.qvd&lt;/P&gt;&lt;P&gt;(qvd) WHERE Date(CaptureDateTime) &amp;gt; '$(vStDt)' AND Date(CaptureDateTime) &amp;lt; '$(vEnDt)';&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 11:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Not-working-Where-condition-by-using-variables/m-p/245082#M93441</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-03T11:18:57Z</dc:date>
    </item>
  </channel>
</rss>

