<?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 How to assign a SQL-Query-result to a variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560450#M209199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;following Question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a SQL-statement which provides the maximum of a database field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: select max(field1) as result from table1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I assign this sql-result-value to a qlikview-variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let @vMAXIMUM = ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Nov 2013 13:01:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-21T13:01:03Z</dc:date>
    <item>
      <title>How to assign a SQL-Query-result to a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560450#M209199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;following Question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a SQL-statement which provides the maximum of a database field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: select max(field1) as result from table1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I assign this sql-result-value to a qlikview-variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let @vMAXIMUM = ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560450#M209199</guid>
      <dc:creator />
      <dc:date>2013-11-21T13:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a SQL-Query-result to a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560451#M209200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;LOAD the sql into a table&lt;/P&gt;&lt;P&gt;use the peek() function to populate your variable&lt;/P&gt;&lt;P&gt;drop the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560451#M209200</guid>
      <dc:creator />
      <dc:date>2013-11-21T13:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a SQL-Query-result to a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560452#M209201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It cannot be assigned directly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SQL SELECT Max(field1) as Result FROM table1;&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;LET vMAXIMUM = Peek('Result', 'Table1');&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;DROP Table Table1;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:04:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560452#M209201</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-11-21T13:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a SQL-Query-result to a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560453#M209202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Max(field1) as MaxValue;&lt;/P&gt;&lt;P&gt;SQL Select field1 From &amp;lt;data source&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMax=Peek('MaxValue');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560453#M209202</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-11-21T13:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a SQL-Query-result to a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560454#M209203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your incredible fast help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 13:06:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/560454#M209203</guid>
      <dc:creator />
      <dc:date>2013-11-21T13:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a SQL-Query-result to a variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/1759794#M453982</link>
      <description>&lt;P&gt;Hi, I am doing the same but getting a null value in the variable.&lt;/P&gt;&lt;P&gt;A:&lt;BR /&gt;SQL&lt;BR /&gt;select trunc(max(Event_Date)) as Result from Event;&lt;/P&gt;&lt;P&gt;LET vMaxDate = peek('Result','A');&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 10:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-SQL-Query-result-to-a-variable/m-p/1759794#M453982</guid>
      <dc:creator>rvsaraswat</dc:creator>
      <dc:date>2020-11-09T10:48:58Z</dc:date>
    </item>
  </channel>
</rss>

