<?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 [ASK] Looping Load multiple ODBC, same database structure in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204086#M387176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear QlikView Master,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a customer that have multiple database,&lt;SPAN style="font-size: 10pt;"&gt;1 branch = 1 database, with total around 30 branches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And there's no different in database structure. &lt;SPAN style="font-size: 10pt;"&gt;So i can use 1 query in every database.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is when i have &lt;SPAN style="font-size: 10pt;"&gt;to concatenate 30 database into 1 qvd.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there any way to loop the odbc connection and concatenate the table from 30 databases into 1 qvd?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Many Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Oct 2016 03:34:53 GMT</pubDate>
    <dc:creator>rendiyan</dc:creator>
    <dc:date>2016-10-06T03:34:53Z</dc:date>
    <item>
      <title>[ASK] Looping Load multiple ODBC, same database structure</title>
      <link>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204086#M387176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear QlikView Master,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a customer that have multiple database,&lt;SPAN style="font-size: 10pt;"&gt;1 branch = 1 database, with total around 30 branches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And there's no different in database structure. &lt;SPAN style="font-size: 10pt;"&gt;So i can use 1 query in every database.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is when i have &lt;SPAN style="font-size: 10pt;"&gt;to concatenate 30 database into 1 qvd.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there any way to loop the odbc connection and concatenate the table from 30 databases into 1 qvd?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Many Thank You&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 03:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204086#M387176</guid>
      <dc:creator>rendiyan</dc:creator>
      <dc:date>2016-10-06T03:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: [ASK] Looping Load multiple ODBC, same database structure</title>
      <link>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204087#M387177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;in the script you can use a variable to define the odbc connection string &lt;/P&gt;&lt;P&gt;so your script should look something like&lt;/P&gt;&lt;P&gt;for i=1 to 30 &lt;/P&gt;&lt;P&gt;set vODBC = company$(i);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;odbc conncet to '$(vODBC);&lt;/P&gt;&lt;P&gt;sql select *&lt;/P&gt;&lt;P&gt;From Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 05:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204087#M387177</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2016-10-06T05:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: [ASK] Looping Load multiple ODBC, same database structure</title>
      <link>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204088#M387178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what is your source. I just created a sample file which consolidate .xlsb files using ODBC connection. You can modify it s per your requirment. Have a look at the attached file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 06:07:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204088#M387178</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-10-06T06:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: [ASK] Looping Load multiple ODBC, same database structure</title>
      <link>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204089#M387179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Liron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked, i've combined my script with your solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But first i need to create connection string from qlikview one-by-one and store it into excels files with last semicollumn character removed.&lt;/P&gt;&lt;P&gt;And then i create the loop with your logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the result :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="color: #575757;"&gt;Script&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Tb_Connection:&lt;/P&gt;&lt;P&gt;LOAD Connection&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Ms Sources - Mdb.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT_Mdb:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INITIAL_Mdb&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&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;FOR nrow = 0 TO noOfRows('Tb_Connection') - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vBD = peek('Connection',$(nrow),'Tb_Connection');&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vBD);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Concatenate(RESULT_Mdb)&lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL SELECT CompanyName as Shippers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShipperID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(vBD)' as Flag_Mdb&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM Shippers;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Tb_Connection;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thank you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 06:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ASK-Looping-Load-multiple-ODBC-same-database-structure/m-p/1204089#M387179</guid>
      <dc:creator>rendiyan</dc:creator>
      <dc:date>2016-10-06T06:59:34Z</dc:date>
    </item>
  </channel>
</rss>

