<?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: How can I transfer a QlikView variable to a SQL statement? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423438#M157834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 09:43:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-19T09:43:43Z</dc:date>
    <item>
      <title>How can I transfer a QlikView variable to a SQL statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423434#M157830</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;My document (qvw file) has a connection with a MS-SQL database.&lt;/P&gt;&lt;P&gt;In my script I use SQL statements like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer:&lt;BR /&gt;SQL&lt;BR /&gt;Select * from Customer;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Suppose I've a variable StartDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET StartDate=MakeDate(2012,01,01);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to use the variable StartDate in a SQL statement?&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer:&lt;BR /&gt;SQL&lt;BR /&gt;Select * from Customer where Customer.Date &amp;gt;= StartDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that in this example I better switch to QlikView syntax but I've fairly complex SQL statements that are hard to translate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 13:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423434#M157830</guid>
      <dc:creator />
      <dc:date>2012-10-17T13:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I transfer a QlikView variable to a SQL statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423435#M157831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer:&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;Select * from Customer where Customer.Date &amp;gt;= '$(StartDate)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 14:08:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423435#M157831</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-10-17T14:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I transfer a QlikView variable to a SQL statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423436#M157832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, it's an issue of format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vDateString=Year( &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;StartDate&lt;/SPAN&gt; )&amp;amp;num(Month( &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;StartDate&lt;/SPAN&gt; ))&amp;amp;Day( &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;StartDate&lt;/SPAN&gt; );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Customer:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;SQL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Select * from Customer where Customer.Date &amp;gt;= &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;CONVERT&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;datetime&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;'$(vDateString')&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000;"&gt;112&lt;/SPAN&gt;&lt;SPAN class="pun" style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 07:26:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423436#M157832</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2012-10-18T07:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I transfer a QlikView variable to a SQL statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423437#M157833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 09:43:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423437#M157833</guid>
      <dc:creator />
      <dc:date>2012-10-19T09:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I transfer a QlikView variable to a SQL statement?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423438#M157834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 09:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-transfer-a-QlikView-variable-to-a-SQL-statement/m-p/423438#M157834</guid>
      <dc:creator />
      <dc:date>2012-10-19T09:43:43Z</dc:date>
    </item>
  </channel>
</rss>

