<?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 Query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Query/m-p/1226604#M391430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an application that utilizes SQL as the data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On my home screen, I have a button for users to click that represents different divisions of our brand that they can click on to dive into that data. I want the button to do two things;&lt;/P&gt;&lt;P&gt;1. Activate a sheet, which is easy and I have that already built.&lt;/P&gt;&lt;P&gt;2. Also, when the user clicks on the button, they will query the database to return only data specific to that division. The field that I would want to be querying is called twAccountID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Each division has a numeric value, for this example, when the user clicks on the button I want to return the twAccountID = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A sample row of data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;twRecordID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; twAccountID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the structure for this search?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2017 20:03:16 GMT</pubDate>
    <dc:creator>evansabres</dc:creator>
    <dc:date>2017-01-10T20:03:16Z</dc:date>
    <item>
      <title>SQL Query</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query/m-p/1226604#M391430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an application that utilizes SQL as the data source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On my home screen, I have a button for users to click that represents different divisions of our brand that they can click on to dive into that data. I want the button to do two things;&lt;/P&gt;&lt;P&gt;1. Activate a sheet, which is easy and I have that already built.&lt;/P&gt;&lt;P&gt;2. Also, when the user clicks on the button, they will query the database to return only data specific to that division. The field that I would want to be querying is called twAccountID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Each division has a numeric value, for this example, when the user clicks on the button I want to return the twAccountID = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A sample row of data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;twRecordID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; twAccountID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the structure for this search?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 20:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query/m-p/1226604#M391430</guid>
      <dc:creator>evansabres</dc:creator>
      <dc:date>2017-01-10T20:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query/m-p/1226605#M391431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to do the next steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.- Create a variable in variable panel.&lt;/P&gt;&lt;P&gt;2.- Create a objet of input table using the variable that you have created.&lt;/P&gt;&lt;P&gt;3.- Create a botton with the action 'execute script'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Your SQL should be&amp;nbsp; like this&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; date_created,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; employee_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; twAccountID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; order_status_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; paid_date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; total,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_id;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM orders&lt;/P&gt;&lt;P&gt;where twAccountID=$(MiVariable);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can select the number in the 'input table' and after execute the script with &lt;/P&gt;&lt;P&gt;the botton that you created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 20:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query/m-p/1226605#M391431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-10T20:58:47Z</dc:date>
    </item>
  </channel>
</rss>

