<?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: Comparing data from two different data sources in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388825#M696944</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your second suggestion is exactly what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Johannes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 10:35:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-28T10:35:04Z</dc:date>
    <item>
      <title>Comparing data from two different data sources</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388823#M696942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to compare running times of benchmark tests which are stored in two different databases using charts. The data structure as well as the names of the fields are identical in each of the databases.&lt;/P&gt;&lt;P&gt;For example, I have the following tables containing the fields below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TESTCASE&lt;BR /&gt;&amp;nbsp; TC_Id&lt;BR /&gt;&amp;nbsp; TC_Nr&lt;BR /&gt;&amp;nbsp; TC_Name&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;TESTCASE_RUN&lt;BR /&gt;&amp;nbsp; TCRun_Id&lt;BR /&gt;&amp;nbsp; TC_Id&lt;BR /&gt;&amp;nbsp; TC_Duration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought, the best thing for me would be to have the tables of each database in two different namespaces. So I used labels to declare namespaces. In the edit script I used the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;code&amp;gt;&lt;BR /&gt;ODBC CONNECT32 TO [Database1] ...&lt;/P&gt;&lt;P&gt;QUALIFY *;&lt;BR /&gt;DB1:&lt;BR /&gt;SQL SELECT * FROM [Database1].TESTCASE&lt;/P&gt;&lt;P&gt;DB1:&lt;BR /&gt;SQL SELECT * FROM [Database1].TESTCASE_RUN&lt;/P&gt;&lt;P&gt;ODBC CONNECT32 TO [Database2] ...&lt;/P&gt;&lt;P&gt;DB2:&lt;BR /&gt;SQL SELECT * FROM [Database2].TESTCASE&lt;/P&gt;&lt;P&gt;DB2:&lt;BR /&gt;SQL SELECT * FROM [Database2].TESTCASE_RUN&lt;BR /&gt;&amp;lt;/code&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not have the effect I want to achieve, since:&lt;/P&gt;&lt;P&gt;* On creating a new sheet object the following fields are shown:&lt;BR /&gt;&amp;nbsp; - DB1.TC_Id&lt;BR /&gt;&amp;nbsp; - DB1.TC_Nr&lt;BR /&gt;&amp;nbsp; - DB1.TC_Name&lt;BR /&gt;&amp;nbsp; - DB1-1.TCRun_Id&lt;BR /&gt;&amp;nbsp; - DB1-1.TC_Id&lt;BR /&gt;&amp;nbsp; - DB1-1.Duration&lt;BR /&gt;&amp;nbsp; - DB2.TC_Id&lt;BR /&gt;&amp;nbsp; - ...&lt;BR /&gt;* The tables of DB1 and DB1-1 are not connected, as they would be without using labels and the QUALIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody has an idea how to import the tables from the different databases into different namespaces? I've also tried to rename the single fields in the script, didn't work either (Message: TC_Id already exists).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388823#M696942</guid>
      <dc:creator />
      <dc:date>2013-02-27T13:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing data from two different data sources</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388824#M696943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because the fields in TESTCASE and TESTCASE_RUN are not the same, you cannot rely on auto-concatenation. This should solve your problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QUALIFY *;&lt;/P&gt;&lt;P&gt;DB1:&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM [Database1].TESTCASE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(DB1)&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM [Database1].TESTCASE_RUN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally, I would not load the data into two separate namespaces, I would rather join them in a single table and use a field to indicate the source. Something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONNECT ... to DB1 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DB1' As Source;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM [Database1].TESTCASE&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Concatenate(Data)&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DB1' As Source;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM [Database1].TESTCASE_RUN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONNECT ... to DB2 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(Data)&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DB2' As Source;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM [Database1].TESTCASE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate(Data)&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DB2' As Source;&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM [Database1].TESTCASE_RUN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388824#M696943</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-02-27T13:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing data from two different data sources</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388825#M696944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your second suggestion is exactly what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Johannes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 10:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-data-from-two-different-data-sources/m-p/388825#M696944</guid>
      <dc:creator />
      <dc:date>2013-02-28T10:35:04Z</dc:date>
    </item>
  </channel>
</rss>

