<?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 Reuse same script to get data from multiple sources in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reuse-same-script-to-get-data-from-multiple-sources/m-p/402540#M697852</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing an App that is extracting data from a financial system. There are 3 different databases for 3 business entities. I want to reuse the same script for each data source as they have an identical schema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking of writing the common LOAD/SELECT statements in an include file and load it three times.&amp;nbsp; Something like the following:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13600324829967014" jivemacro_uid="_13600324829967014"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 To [&amp;lt;connection string 1&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=script.txt);&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;P&gt;ODBC CONNECT32 To [&amp;lt;connection string 2&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=script.txt);&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;P&gt;ODBC CONNECT32 To [&amp;lt;connection string 3&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=script.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a sensible approach?&amp;nbsp; Is there any best practice for handling this situation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Feb 2013 02:49:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-05T02:49:00Z</dc:date>
    <item>
      <title>Reuse same script to get data from multiple sources</title>
      <link>https://community.qlik.com/t5/QlikView/Reuse-same-script-to-get-data-from-multiple-sources/m-p/402540#M697852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing an App that is extracting data from a financial system. There are 3 different databases for 3 business entities. I want to reuse the same script for each data source as they have an identical schema.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking of writing the common LOAD/SELECT statements in an include file and load it three times.&amp;nbsp; Something like the following:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13600324829967014" jivemacro_uid="_13600324829967014"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 To [&amp;lt;connection string 1&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=script.txt);&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;P&gt;ODBC CONNECT32 To [&amp;lt;connection string 2&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=script.txt);&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;P&gt;ODBC CONNECT32 To [&amp;lt;connection string 3&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(Include=script.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a sensible approach?&amp;nbsp; Is there any best practice for handling this situation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 02:49:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reuse-same-script-to-get-data-from-multiple-sources/m-p/402540#M697852</guid>
      <dc:creator />
      <dc:date>2013-02-05T02:49:00Z</dc:date>
    </item>
  </channel>
</rss>

