<?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: Use variable with set analysis in Where  condition of SQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692256#M671705</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;Only() don't work in script, try Peek() or LookUp().&amp;nbsp; First check whether you are getting value in variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;fiscal_period column, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Period_Name&lt;/SPAN&gt; and vPeriod variable are in the same format?&amp;nbsp; If not convert vPeriod to fiscal_period format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If not working can you attach some sample values of fiscal_period&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 01:59:29 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2014-09-15T01:59:29Z</dc:date>
    <item>
      <title>Use variable with set analysis in Where  condition of SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692254#M671703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi qlik gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a fiscal calendar and a QVD based on that,&lt;/P&gt;&lt;P&gt;I have a sql query in my qlikview load script in which I want to pass current fiscal period (which is a column in the qvd) in where condition like so- &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;WHERE fiscal_period = '$(vPeriod)'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and my variable is Let vPeriod = chr(39)&amp;amp;Only({&amp;lt;DATE={"=today()"}&amp;gt;}Period_Name)&amp;amp;chr(39)&lt;/P&gt;&lt;P&gt;When i load the script and print the variable in Text box I get the resolved value but when i clikc on load script, this perticular query doesnt fetch any rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why, please help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Sep 2014 23:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692254#M671703</guid>
      <dc:creator />
      <dc:date>2014-09-14T23:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use variable with set analysis in Where  condition of SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692255#M671704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could be a date format issue. Try to use the number format of the date using num()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Sep 2014 23:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692255#M671704</guid>
      <dc:creator>danieloberbilli</dc:creator>
      <dc:date>2014-09-14T23:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use variable with set analysis in Where  condition of SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692256#M671705</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;Only() don't work in script, try Peek() or LookUp().&amp;nbsp; First check whether you are getting value in variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;fiscal_period column, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Period_Name&lt;/SPAN&gt; and vPeriod variable are in the same format?&amp;nbsp; If not convert vPeriod to fiscal_period format.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If not working can you attach some sample values of fiscal_period&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 01:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-variable-with-set-analysis-in-Where-condition-of-SQL/m-p/692256#M671705</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-09-15T01:59:29Z</dc:date>
    </item>
  </channel>
</rss>

