<?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: Variable Qlikview in SQL Select in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100831#M16065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your original post calls that field '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Maxpiece', not 'MaxNo'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Nov 2018 19:13:28 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2018-11-03T19:13:28Z</dc:date>
    <item>
      <title>Variable Qlikview in SQL Select</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100828#M16062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Hello everyone,&lt;BR /&gt;How with a SQL connection, recover data that has not been repatriated since the last connection and are stored in a QVD file (Ecritures.qvd)?&lt;BR /&gt;I can not use the $ (Maxpiece) variable with the SQL SELECT statement with the Where condition.&lt;BR /&gt;You will find below my script which does not accept the variable&lt;BR /&gt;thank you for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;========================&lt;/P&gt;&lt;P&gt; LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(EC_No) as Maxpiece,&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO BASE_LOCAL2 (XUserId is bbbRdYRNJbaMXUVMXTcB, XPassword is vvVYaRdNrLacWXJObA);&lt;/P&gt;&lt;P&gt; Ecritures:&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM ACHATS.dbo."ECRITURES"&lt;/P&gt;&lt;P&gt;Where (EC_No &amp;gt; $(Maxpiece));&lt;/P&gt;&lt;P&gt;============================================&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2018 09:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100828#M16062</guid>
      <dc:creator>odaher123</dc:creator>
      <dc:date>2018-11-02T09:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Qlikview in SQL Select</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100829#M16063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olivier, in that code Maxpiece is a field, not a variable, you can create a variable of that field value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET &lt;STRONG&gt;vMaxpiece&lt;/STRONG&gt; = Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Maxpiece',0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;And use this variable in where:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Where (EC_No &amp;gt; $(&lt;STRONG&gt;vMaxpiece&lt;/STRONG&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2018 09:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100829#M16063</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-11-02T09:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Qlikview in SQL Select</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100830#M16064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;SPAN lang="en"&gt;Hi Ruben&lt;BR /&gt;Thank you for your answer, it was almost correct but it did not work. I found in the meantime how to do it and here is the solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: yellow;"&gt;Max(EC_No) as MaxNo,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="background: yellow;"&gt;Let Maxpiece = peek(‘MaxNo’) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO BASE_LOCAL2 (XUserId is bbbRdYRNJbaMXUVMXTcB, XPassword is vvVYaRdNrLacWXJObA);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ecritures:&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM ACHATS.dbo."ECRITURES"&lt;/P&gt;&lt;P&gt;Where (EC_No &amp;gt; $(Maxpiece));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2018 15:17:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100830#M16064</guid>
      <dc:creator>odaher123</dc:creator>
      <dc:date>2018-11-02T15:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Qlikview in SQL Select</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100831#M16065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your original post calls that field '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Maxpiece', not 'MaxNo'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2018 19:13:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Qlikview-in-SQL-Select/m-p/100831#M16065</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-11-03T19:13:28Z</dc:date>
    </item>
  </channel>
</rss>

