<?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: SQL Load Script using Filter List from Excel in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606591#M4240</link>
    <description>&lt;P&gt;I have a SQL query with changing filters.&lt;/P&gt;&lt;P&gt;Within my "WHERE IN" clause, the 'Value 1', 'Value 2', and 'Value 3' are always changing and varying in amounts. I have about 500 items in my "WHERE IN" clause and that gets manually updated from time to time. I was hoping to pull in the values in there "WHERE IN" filter from another source, such as a spreadsheet that is located on our network drive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, any changes I make in the query in the development environment, I have to request a migration to production in my organization. It would be great to have my app on an hourly refresh to rerun the SQL query to load in the latest data and then the "WHERE IN" values are pulled from an Excel spreadsheet located on the network drive so that can get updated and pulled in with the hourly refresh.&lt;/P&gt;&lt;P&gt;Basic Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM TABLE T&lt;/P&gt;&lt;P&gt;WHERE T.FIELD1 IN (&lt;/P&gt;&lt;P&gt;'Value 1'&lt;/P&gt;&lt;P&gt;,'Value 2'&lt;/P&gt;&lt;P&gt;,'Value 3'&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 16:09:19 GMT</pubDate>
    <dc:creator>mskusace</dc:creator>
    <dc:date>2019-07-26T16:09:19Z</dc:date>
    <item>
      <title>SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606570#M4238</link>
      <description>&lt;P&gt;I have an ODBC connection to a database, and I have developed a query to extract data from this database into Qlik Sense. In my "WHERE IN" clause, there is a rather large filter list. I would like to use either an Excel spreadsheet or another source to house the filter list and the SQL query to pull in that list in the "WHERE IN" clause. The filter list is manually changed and I don't want to keep having to migrate the app to our production environment if the app can automatically refresh the SQL query and pull in the filter list from a separate source.&lt;/P&gt;&lt;P&gt;Please let me know if that doesn't make sense or if you need further clarification.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 17:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606570#M4238</guid>
      <dc:creator>mskusace</dc:creator>
      <dc:date>2021-12-13T17:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606587#M4239</link>
      <description>&lt;P&gt;Makes sense. Whats the issue you are facing?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:03:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606587#M4239</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-07-26T16:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606591#M4240</link>
      <description>&lt;P&gt;I have a SQL query with changing filters.&lt;/P&gt;&lt;P&gt;Within my "WHERE IN" clause, the 'Value 1', 'Value 2', and 'Value 3' are always changing and varying in amounts. I have about 500 items in my "WHERE IN" clause and that gets manually updated from time to time. I was hoping to pull in the values in there "WHERE IN" filter from another source, such as a spreadsheet that is located on our network drive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, any changes I make in the query in the development environment, I have to request a migration to production in my organization. It would be great to have my app on an hourly refresh to rerun the SQL query to load in the latest data and then the "WHERE IN" values are pulled from an Excel spreadsheet located on the network drive so that can get updated and pulled in with the hourly refresh.&lt;/P&gt;&lt;P&gt;Basic Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM TABLE T&lt;/P&gt;&lt;P&gt;WHERE T.FIELD1 IN (&lt;/P&gt;&lt;P&gt;'Value 1'&lt;/P&gt;&lt;P&gt;,'Value 2'&lt;/P&gt;&lt;P&gt;,'Value 3'&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606591#M4240</guid>
      <dc:creator>mskusace</dc:creator>
      <dc:date>2019-07-26T16:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606593#M4241</link>
      <description>&lt;P&gt;As i said it makes sense and should work.&lt;/P&gt;&lt;P&gt;load the filter list into a variable like&lt;/P&gt;&lt;P&gt;'Value 1' ,'Value 2' ,'Value 3'&lt;/P&gt;&lt;P&gt;and use it in the query&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606593#M4241</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-07-26T16:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606595#M4242</link>
      <description>&lt;P&gt;What would the syntax be?&lt;/P&gt;&lt;P&gt;SET FilterList =&amp;nbsp;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;[List]&lt;/P&gt;&lt;P&gt;FROM SharedDrive\\ExcelSpreadsheet.xlsx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SQL * SELECT&amp;nbsp;&lt;/P&gt;&lt;P&gt;FROM TABLE&lt;/P&gt;&lt;P&gt;WHERE T.FIELD IN (&lt;/P&gt;&lt;P&gt;FilterList&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;That is some pseudo syntax, since I haven't used the variable in the load editor and especially for values located in a file.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 16:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606595#M4242</guid>
      <dc:creator>mskusace</dc:creator>
      <dc:date>2019-07-26T16:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606618#M4243</link>
      <description>&lt;P&gt;roughcode below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;on the road so cant try it out&lt;/P&gt;&lt;P&gt;List:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;[List]&lt;/P&gt;&lt;P&gt;FROM SharedDrive\\ExcelSpreadsheet.xlsx;&lt;/P&gt;&lt;P&gt;Let&amp;nbsp;vFilterList = peek('List',0,'List');&lt;/P&gt;&lt;P&gt;SQL * SELECT&amp;nbsp;&lt;/P&gt;&lt;P&gt;FROM TABLE&lt;/P&gt;&lt;P&gt;WHERE T.FIELD IN (&lt;/P&gt;&lt;P&gt;$(vFilterList)&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 18:53:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606618#M4243</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-07-26T18:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606655#M4244</link>
      <description>&lt;P&gt;A co-worker showed me a solution!&lt;/P&gt;&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;FONT face="Segoe UI" size="2" color="#000000"&gt;$(Include=lib://SharedDrive/Code.SQL&lt;BR /&gt;&lt;BR /&gt;Then Qlik Sense just executes that code so I can edit the code however I want.&lt;/FONT&gt;&lt;!-- EndFragment  --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 20:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606655#M4244</guid>
      <dc:creator>mskusace</dc:creator>
      <dc:date>2019-07-26T20:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606675#M4245</link>
      <description>&lt;P&gt;I would suggest making it a two step process. Create a table in the data load editor with your SQL, minus the Where clause. Then create a second table by loading your list of filter values. Finally, use these two temp tables in the data load editor to create a third table. Join them together with an inner join. Drop the two temp tables and use the third table as your data source.&amp;nbsp; The inner join will remove all records from the SQL table that don't exist in the filter value table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 00:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1606675#M4245</guid>
      <dc:creator>nate_ak</dc:creator>
      <dc:date>2019-07-27T00:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Load Script using Filter List from Excel</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1607076#M4250</link>
      <description>&lt;P&gt;Thanks for posting a solution! That definitely does seem like a viable solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found the solution I posted to be more efficient for my needs and with the current processes established for updating my dashboards. I will that in mind for future development though.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 14:40:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/SQL-Load-Script-using-Filter-List-from-Excel/m-p/1607076#M4250</guid>
      <dc:creator>mskusace</dc:creator>
      <dc:date>2019-07-29T14:40:15Z</dc:date>
    </item>
  </channel>
</rss>

