<?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 SQL Statement in LET Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229915#M502899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per my knowledge you cant put sql query in a variable at script level but you can do it at the design / development level by defining variable in document.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Shumail Hussain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jul 2010 07:53:04 GMT</pubDate>
    <dc:creator>shumailh</dc:creator>
    <dc:date>2010-07-22T07:53:04Z</dc:date>
    <item>
      <title>SQL Statement in LET Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229914#M502898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Can I use the SQL Statement in LET statement. For example I want to calculate the minimum date from a table initialize to a variable. So that it can be used in my calender.&lt;/P&gt;&lt;P&gt;For example I want do some thing like the below one to that I can use vDateMin in any of the variable for MinDate in my calender.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LET vDateMin = SQL Select min(d_entry_date) from Tbl_DWR;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 07:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229914#M502898</guid>
      <dc:creator />
      <dc:date>2010-07-22T07:46:09Z</dc:date>
    </item>
    <item>
      <title>SQL Statement in LET Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229915#M502899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per my knowledge you cant put sql query in a variable at script level but you can do it at the design / development level by defining variable in document.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Shumail Hussain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 07:53:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229915#M502899</guid>
      <dc:creator>shumailh</dc:creator>
      <dc:date>2010-07-22T07:53:04Z</dc:date>
    </item>
    <item>
      <title>SQL Statement in LET Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229916#M502900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rikab,&lt;/P&gt;&lt;P&gt;Let Statement works like variable declaration and Initialization. So during that time you cant assign value from any backend tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil Jain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 07:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229916#M502900</guid>
      <dc:creator>suniljain</dc:creator>
      <dc:date>2010-07-22T07:57:10Z</dc:date>
    </item>
    <item>
      <title>SQL Statement in LET Statement</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229917#M502901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be work for you.&lt;/P&gt;&lt;P&gt;We can get a value from a table, such in that example:&lt;/P&gt;&lt;P&gt;Currrency:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; "X" , "XValue"&lt;BR /&gt; usd , usdValue&lt;BR /&gt; eur , eurValue&lt;BR /&gt; tl , tlValue&lt;BR /&gt;];&lt;BR /&gt;SET vCurrency = '=Minstring("XValue")';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you store your result on a table, you can use its columns, and take into a variable.&lt;BR /&gt;If we customize to your case, You can try this:&lt;/P&gt;&lt;P&gt;MinDate:&lt;BR /&gt;SQL Select min(d_entry_date) As mDate from Tbl_DWR;&lt;/P&gt;&lt;P&gt;SET vCurrency = '=Minstring("mDate")';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 08:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Statement-in-LET-Statement/m-p/229917#M502901</guid>
      <dc:creator />
      <dc:date>2010-07-22T08:10:01Z</dc:date>
    </item>
  </channel>
</rss>

