<?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 select with parameter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482545#M1130549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I've the following sql select:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select FIELD1, FIELD2, FIELD3 from MYTABLE where project_id in ('AAA', 'BBB', 'CCC')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would change it this way&lt;/P&gt;&lt;P&gt;SELECT FIELD1, FIELD2, FIELD3 from MYTABLE where poject_id in ('$(var_paramters)')&lt;/P&gt;&lt;P&gt;but I don't know the right way to build var_parameters&lt;/P&gt;&lt;P&gt;Help please&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Nov 2013 22:42:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-23T22:42:42Z</dc:date>
    <item>
      <title>sql select with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482545#M1130549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I've the following sql select:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select FIELD1, FIELD2, FIELD3 from MYTABLE where project_id in ('AAA', 'BBB', 'CCC')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would change it this way&lt;/P&gt;&lt;P&gt;SELECT FIELD1, FIELD2, FIELD3 from MYTABLE where poject_id in ('$(var_paramters)')&lt;/P&gt;&lt;P&gt;but I don't know the right way to build var_parameters&lt;/P&gt;&lt;P&gt;Help please&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2013 22:42:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482545#M1130549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-23T22:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: sql select with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482546#M1130550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set var_parameters = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;'AAA', 'BBB', 'CCC'&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SELECT FIELD1, FIELD2, FIELD3 from MYTABLE where poject_id in ($(var_paramters));&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Nov 2013 02:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482546#M1130550</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2013-11-24T02:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: sql select with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482547#M1130551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;($(var_paramters)) ITS A QLIKVIEW syntax, You cant use it in select statement.&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;first load all record from sql like the script below:&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;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SELECT FIELD1, FIELD2, FIELD3 from MYTABLE&lt;/SPAN&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;the do the preceding load of qlikview like below:&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;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Set var_parameters = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'AAA', 'BBB', 'CCC'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;;&lt;/SPAN&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;SELECT FIELD1, FIELD2, FIELD3 from MYTABLE where poject_id in ($(var_paramters));&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;final script will look like below:&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;....................&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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Set var_parameters = &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'AAA', 'BBB', 'CCC'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;;&lt;/SPAN&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;&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;Load FIELD1, FIELD2, FIELD3&amp;nbsp; where poject_id in ($(var_paramters));&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;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SQL SELECT FIELD1, FIELD2, FIELD3 from MYTABLE&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Nov 2013 05:28:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482547#M1130551</guid>
      <dc:creator>israrkhan</dc:creator>
      <dc:date>2013-11-24T05:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: sql select with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482548#M1130552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Israr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not agree with reply above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I routinely use SQL which exploits adding in text to the SQL command using QlikView variables as Krishna suggests, especially for incremental loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the load script in the qvw attached to this document &lt;A _jive_internal="true" class="j-search-result-value" href="https://community.qlik.com/docs/DOC-3891" style="margin: 0 0 3px; font-weight: bold; font-size: 15px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Incremental_Load.qvw&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Nov 2013 10:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482548#M1130552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-24T10:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: sql select with parameter</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482549#M1130553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Nov 2013 19:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select-with-parameter/m-p/482549#M1130553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-24T19:09:33Z</dc:date>
    </item>
  </channel>
</rss>

