<?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 variable in SQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229105#M81062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at All,&lt;BR /&gt;in a menu I set a new variables called: loadf&lt;/P&gt;&lt;P&gt;if i set like a content of tjis variable Getfieldselection(vrs)&lt;BR /&gt;where vrs is a list box I'm able to see what is the value I selected in&lt;BR /&gt;listbox.&lt;BR /&gt;Now I would topass this variable in a script sql&lt;/P&gt;&lt;P&gt;load a, b, c from ..&lt;BR /&gt;where a= '$(loadf)';&lt;BR /&gt;In the log file I see&lt;BR /&gt;where a= 'Getfieldselection(vrs)'';&lt;BR /&gt;and doesn't work&lt;BR /&gt;Does exists a way ri ibtain in sql where the value I selected in List box?&lt;/P&gt;&lt;P&gt;Thamks&lt;BR /&gt;Best Regards&lt;BR /&gt;Slash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 31 Oct 2009 03:29:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-31T03:29:38Z</dc:date>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229105#M81062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at All,&lt;BR /&gt;in a menu I set a new variables called: loadf&lt;/P&gt;&lt;P&gt;if i set like a content of tjis variable Getfieldselection(vrs)&lt;BR /&gt;where vrs is a list box I'm able to see what is the value I selected in&lt;BR /&gt;listbox.&lt;BR /&gt;Now I would topass this variable in a script sql&lt;/P&gt;&lt;P&gt;load a, b, c from ..&lt;BR /&gt;where a= '$(loadf)';&lt;BR /&gt;In the log file I see&lt;BR /&gt;where a= 'Getfieldselection(vrs)'';&lt;BR /&gt;and doesn't work&lt;BR /&gt;Does exists a way ri ibtain in sql where the value I selected in List box?&lt;/P&gt;&lt;P&gt;Thamks&lt;BR /&gt;Best Regards&lt;BR /&gt;Slash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 03:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229105#M81062</guid>
      <dc:creator />
      <dc:date>2009-10-31T03:29:38Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229106#M81063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you define loadf as&lt;BR /&gt;Getfieldselection(vrs)&lt;BR /&gt;or as&lt;BR /&gt;&lt;B&gt;=&lt;/B&gt;Getfieldselection(vrs)&lt;BR /&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 08:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229106#M81063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-10-31T08:45:38Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229107#M81064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried in either way.&lt;/P&gt;&lt;P&gt;the problem is Whree.. '= '&lt;/P&gt;&lt;P&gt;in the log the result is the same:&lt;/P&gt;&lt;P&gt;'Getfieldselections'&lt;/P&gt;&lt;P&gt;ot&lt;/P&gt;&lt;P&gt;GetfieldSelections&lt;/P&gt;&lt;P&gt;Ineed to pss the content of variables in he list I selected.&lt;/P&gt;&lt;P&gt;After I passed the value bt reload I would to chang the value of Where statement..&lt;/P&gt;&lt;P&gt;I think us a cool soluction... uf it works ...&lt;/P&gt;&lt;P&gt;Slash&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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 13:20:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229107#M81064</guid>
      <dc:creator />
      <dc:date>2009-10-31T13:20:57Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229108#M81065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2009 17:28:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229108#M81065</guid>
      <dc:creator />
      <dc:date>2009-11-01T17:28:33Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229109#M81066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when do you have many values you must use "where in " .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2009 21:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229109#M81066</guid>
      <dc:creator />
      <dc:date>2009-11-01T21:40:27Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229110#M81067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, Ivanidlo is right that you have to use in().&lt;BR /&gt;Second, you cannot use Getfieldsselections in the script - during the reload process, the fields don't exist yet, no mention the selections.&lt;BR /&gt;So, what you have to do is to capture the selections before the reload, format in a way usable in the script, and reload.&lt;/P&gt;&lt;P&gt;See attached, it works this way:&lt;BR /&gt;1. Make selections in field "vars".&lt;BR /&gt;2. click the reload button.&lt;BR /&gt;3. The field "a" will have only values selected in "Vars" before the reload.&lt;/P&gt;&lt;P&gt;Notice that the variable "loadf" is not changing on selections in "Vars" It changes by a macro "loadf".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 00:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229110#M81067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-02T00:14:48Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229111#M81068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks but it semas doesn't work. I The button doesn't work I attached the button to a macro called "relod" but nothing happens .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the target I need is :&lt;/P&gt;&lt;P&gt;to capture the field select in a list box and pass this value, by vars, in ehere statement in script sql.&lt;/P&gt;&lt;P&gt;Thanks Regards,&lt;/P&gt;&lt;P&gt;Slash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 15:08:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229111#M81068</guid>
      <dc:creator />
      <dc:date>2009-11-02T15:08:50Z</dc:date>
    </item>
    <item>
      <title>variable in SQL</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229112#M81069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to mention - I created this demo in QV &lt;STRONG&gt;9&lt;/STRONG&gt;. The button calls two macros:&lt;BR /&gt;loadf - creates a variable for "where" clause&lt;BR /&gt;reload - reloads and saves.&lt;/P&gt;&lt;P&gt;If you're using older QV version, you have to combine these two macros in one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2009 20:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-SQL/m-p/229112#M81069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-11-02T20:00:03Z</dc:date>
    </item>
  </channel>
</rss>

