<?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: Changinig Variable value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687001#M673799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put the single quotes around the $ expanded variable:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Select * from sales_fact&amp;nbsp; w&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;here modified_Date='&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(Var_Max_Of_Sales_Modified_Date)'&lt;/EM&gt;&lt;/STRONG&gt;; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Aug 2014 15:55:03 GMT</pubDate>
    <dc:creator>m_woolf</dc:creator>
    <dc:date>2014-08-15T15:55:03Z</dc:date>
    <item>
      <title>Changinig Variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687000#M673798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I have a variable in my load script that holds the value of last modified date.&amp;nbsp; This part works fine and hold value of &lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;Var_Max_Of_Sales_Modified_Date&lt;/EM&gt;&lt;/STRONG&gt;=2014-08-12 16:03:31&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sales_Fact&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Modified_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;Var_Max_Of_Sales_Modified_Date&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Modified_Date', -1, 'Sort_Sales'); &lt;/SPAN&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;SPAN style="font-size: 12pt;"&gt;Then I try to use this variable value in the next SQL script and it fails&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Select * from sales_fact&amp;nbsp; w&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;here modified_Date=&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(Var_Max_Of_Sales_Modified_Date)&lt;/EM&gt;&lt;/STRONG&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The SQL scripts expects w&lt;SPAN style="font-size: 12pt;"&gt;here modified_Date=&lt;/SPAN&gt;'2014-08-12 16:03:31' basically these single ticks around the variable value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would appreciate any help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&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;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 15:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687000#M673798</guid>
      <dc:creator />
      <dc:date>2014-08-15T15:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changinig Variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687001#M673799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put the single quotes around the $ expanded variable:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Select * from sales_fact&amp;nbsp; w&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;here modified_Date='&lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;$(Var_Max_Of_Sales_Modified_Date)'&lt;/EM&gt;&lt;/STRONG&gt;; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 15:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687001#M673799</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2014-08-15T15:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Changinig Variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687002#M673800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks . It goes through without an error so I guess it should work. It is still not getting the desired rows as now the SQL statement is expecting the ending numbers after seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how can I format Modified_Date so it is&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2014-08-12 16:03:31.643&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and not&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2014-08-12 16:03:31&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is what I used before it is loaded into variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Modified_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'YYYY-MM-DD hh:mm:ss') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Modified_Date &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 16:06:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changinig-Variable-value/m-p/687002#M673800</guid>
      <dc:creator />
      <dc:date>2014-08-15T16:06:15Z</dc:date>
    </item>
  </channel>
</rss>

