<?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: Left Join within the same table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Left-Join-within-the-same-table/m-p/1636896#M47457</link>
    <description>&lt;P&gt;not sure if there are any fruther subtleties involved in your requriement but below approach should work for you&lt;/P&gt;&lt;P&gt;first load values where column b is not empty in a map&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;BColMap:&lt;/P&gt;&lt;P&gt;mapping load&lt;/P&gt;&lt;P&gt;A,B from xyz where len(B)&amp;gt;0;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then while loading your actual&amp;nbsp; table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;,if(len(B)&amp;gt;0,B,applymap('BColMap',A,'')) as B&lt;/P&gt;&lt;P&gt;,C&lt;/P&gt;&lt;P&gt;from xyz;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 19:23:27 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2019-10-17T19:23:27Z</dc:date>
    <item>
      <title>Left Join within the same table</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-within-the-same-table/m-p/1636894#M47456</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a table with 3 columns : A,B,C.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;For each line with column C = 2, I would like to retrieve the line (in the same table) with the same value in column A and with column C = 1; Once the match is found, the value of Column B should be copied&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Example above would result in:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;As I have a big volume of data, I would like an optimized way to do this operation and appreciate your advice.&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;Annick&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:20:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-within-the-same-table/m-p/1636894#M47456</guid>
      <dc:creator>annick</dc:creator>
      <dc:date>2024-11-16T04:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Left Join within the same table</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Join-within-the-same-table/m-p/1636896#M47457</link>
      <description>&lt;P&gt;not sure if there are any fruther subtleties involved in your requriement but below approach should work for you&lt;/P&gt;&lt;P&gt;first load values where column b is not empty in a map&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;BColMap:&lt;/P&gt;&lt;P&gt;mapping load&lt;/P&gt;&lt;P&gt;A,B from xyz where len(B)&amp;gt;0;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then while loading your actual&amp;nbsp; table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;,if(len(B)&amp;gt;0,B,applymap('BColMap',A,'')) as B&lt;/P&gt;&lt;P&gt;,C&lt;/P&gt;&lt;P&gt;from xyz;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 19:23:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Join-within-the-same-table/m-p/1636896#M47457</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-10-17T19:23:27Z</dc:date>
    </item>
  </channel>
</rss>

