<?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: Join the same field from two different source tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702678#M725702</link>
    <description>&lt;P&gt;I think the suggestion of concatenating at first the joining tables goes in the right direction but this concatenating should be done with a DISTINCT statement because otherwise there may be duplicates in the key-values which would increase the number of records.&lt;/P&gt;&lt;P&gt;Probably better would be to use mappings instead of a join approach. Mappings have no risk to change the number of records and are more flexible in many ways, for example to define an order from which table the match-value should come from at first and/or to set a default-value for non-matching keys. This may look like this:&lt;/P&gt;&lt;P&gt;mapB: mapping load * from TableB;&lt;BR /&gt;mapC: mapping load * from TableC;&lt;/P&gt;&lt;P&gt;TableA: load *, applymap('mapB', [Customer ID],&amp;nbsp;&lt;SPAN&gt;applymap('mapC', [Customer ID], 'myDefault')) as Indicator&lt;BR /&gt;from TableA;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 May 2020 15:04:48 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2020-05-16T15:04:48Z</dc:date>
    <item>
      <title>Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702595#M725699</link>
      <description>&lt;P&gt;I have three tables&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TableA:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Customer ID&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TableB:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Customer ID&lt;/P&gt;&lt;P&gt;Indicator&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TableC:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Customer ID&lt;/P&gt;&lt;P&gt;Indicator&lt;/P&gt;&lt;P&gt;I am doing a Left Join on TableA with TableB to join 'Indicator' Field. Not every Customer ID has Indicator values in TableB and which is why I want to do another left join over TableC, which contains those missing 'Indicator' values. Since the field names are same (Indicator), the 2nd left join fails to add the missing values.&lt;/P&gt;&lt;P&gt;How do I achieve this, with 'Indicator' values from TableB and TableC in a single field?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702595#M725699</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2024-11-16T00:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702597#M725700</link>
      <description>&lt;P&gt;There's probably a shorter form for this, but off the top of my head:&lt;/P&gt;&lt;P&gt;Table A:&lt;/P&gt;&lt;P&gt;Load Customer ID&lt;/P&gt;&lt;P&gt;From TableA;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TableTemp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Customer ID&lt;/P&gt;&lt;P&gt;Indicator&lt;/P&gt;&lt;P&gt;From TableB;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONCATENATE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Customer ID&lt;/P&gt;&lt;P&gt;Indicator&lt;/P&gt;&lt;P&gt;From Table C;&lt;/P&gt;&lt;P&gt;Left Join(TableA)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Customer ID&lt;/P&gt;&lt;P&gt;Indicator&lt;/P&gt;&lt;P&gt;Resident TableTemp;&lt;/P&gt;&lt;P&gt;Drop Table TableTemp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 21:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702597#M725700</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2020-05-15T21:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702625#M725701</link>
      <description>&lt;P&gt;Yes, this code should work. Table B &amp;amp; C should be concatenated before joining with A.&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 03:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702625#M725701</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-05-16T03:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702678#M725702</link>
      <description>&lt;P&gt;I think the suggestion of concatenating at first the joining tables goes in the right direction but this concatenating should be done with a DISTINCT statement because otherwise there may be duplicates in the key-values which would increase the number of records.&lt;/P&gt;&lt;P&gt;Probably better would be to use mappings instead of a join approach. Mappings have no risk to change the number of records and are more flexible in many ways, for example to define an order from which table the match-value should come from at first and/or to set a default-value for non-matching keys. This may look like this:&lt;/P&gt;&lt;P&gt;mapB: mapping load * from TableB;&lt;BR /&gt;mapC: mapping load * from TableC;&lt;/P&gt;&lt;P&gt;TableA: load *, applymap('mapB', [Customer ID],&amp;nbsp;&lt;SPAN&gt;applymap('mapC', [Customer ID], 'myDefault')) as Indicator&lt;BR /&gt;from TableA;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 15:04:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702678#M725702</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-05-16T15:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702692#M725703</link>
      <description>&lt;P&gt;&lt;EM&gt;first create a table D which is table B and a concat of table C. Drop table B and C, and do the left join of table D on table A&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 15:51:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702692#M725703</guid>
      <dc:creator>jochem_zw</dc:creator>
      <dc:date>2020-05-16T15:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702863#M725704</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When our data was all in a single table, we could easily retrieve a particular&amp;nbsp;&lt;A href="https://www.paygonline.vip/" target="_self"&gt;paygonline&lt;/A&gt; row from that table in order to get all the pertinent data we needed for a particular query. For example, looking at our unnormalized table below, if we wanted information on the books that 'John Smith' has checked out.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 16:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1702863#M725704</guid>
      <dc:creator>merceris</dc:creator>
      <dc:date>2020-05-19T16:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Join the same field from two different source tables</title>
      <link>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1703142#M725705</link>
      <description>&lt;P&gt;Thank you all. This is really helpful&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 15:53:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-the-same-field-from-two-different-source-tables/m-p/1703142#M725705</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-05-18T15:53:57Z</dc:date>
    </item>
  </channel>
</rss>

