<?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 2 Left Joins To One Table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258705#M1204145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thompson,&lt;/P&gt;&lt;P&gt;The problem here is the key between 1st table and third table.1st you are joining 1st table and 2nd table with &lt;STRONG&gt;seq no&lt;/STRONG&gt; key.Then you are trying to join the o/p of 1st &amp;amp; 2nd table with 3rd table.&lt;/P&gt;&lt;P&gt;Key between the o/p table and 3rd table is seq no and SubCategory. Now this forms the composite primary key. While joining the o/p table and 3rd table Qlikview will look for the combination of keys and takes the data from 3rd table what ever is matching with the o/p of 1st &amp;amp; 2nd table.&lt;/P&gt;&lt;P&gt;Since 2nd table has SubCategory = 'Parts' and 3rd table has SubCategory = 'Labor' the combination never match , so it is not taking the data from the 3rd table to 1st table.&lt;/P&gt;&lt;P&gt;Hope this may help you.&lt;/P&gt;&lt;P&gt;-Peterson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 May 2010 07:35:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-21T07:35:47Z</dc:date>
    <item>
      <title>2 Left Joins To One Table?</title>
      <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258701#M1204141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the example below I am loading a table then attempting to do 2 left joins to this table. The first left join (Parts) works fine. But I end up without any records from the second join (Labor). In the Script Execution window it appears that nearly 1 million labor records are being loaded.&lt;/P&gt;&lt;P&gt;If I comment out the "parts" left join then the "labor" left join works correctly. What am I missing here? In a previous Qlikview app I was able to do a second left join to a table, the only difference was the second join was to a resident table.&lt;/P&gt;&lt;P&gt;Thanks in advance for any help. Here is my script:&lt;/P&gt;&lt;P&gt;VendorPerformanceInvoices:&lt;BR /&gt;LOAD [Charge-cust],&lt;BR /&gt; Document,&lt;BR /&gt; [Equipment-cust] AS [Vendor-code],&lt;BR /&gt; [Invoice-date],&lt;BR /&gt; [Invoice-Type],&lt;BR /&gt; [Seq-no],&lt;BR /&gt; [Wo-no]&lt;BR /&gt;FROM&lt;BR /&gt;..\DataSources\VendorPerf.qvd&lt;BR /&gt;(qvd)&lt;BR /&gt;WHERE [Invoice-Type] &amp;lt;&amp;gt; 'Sales';&lt;/P&gt;&lt;P&gt;LEFT JOIN (VendorPerformanceInvoices)&lt;BR /&gt;LOAD&lt;BR /&gt; 'Parts' AS SubCategory,&lt;BR /&gt; Cost AS UnitCost,&lt;BR /&gt; [Item-no],&lt;BR /&gt; [Net-price] AS UnitPrice,&lt;BR /&gt; [Qty-shipped],&lt;BR /&gt; [Seq-no],&lt;BR /&gt; [Qty-shipped] * [Net-price] AS SaleAmt,&lt;BR /&gt; [Qty-shipped] * Cost AS CostAmt&lt;BR /&gt;FROM&lt;BR /&gt;..\DataSources\Invoice_Line.qvd&lt;BR /&gt;(qvd)&lt;BR /&gt;WHERE EXISTS([Seq-no]);&lt;/P&gt;&lt;P&gt;LEFT JOIN (VendorPerformanceInvoices)&lt;BR /&gt;LOAD&lt;BR /&gt; 'Labor' AS SubCategory,&lt;BR /&gt; Time_Type,&lt;BR /&gt; [emp-id],&lt;BR /&gt; [wo-no],&lt;BR /&gt; [Sheet-date],&lt;BR /&gt; Hours,&lt;BR /&gt; [Cost-rate],&lt;BR /&gt; [Charge-amt],&lt;BR /&gt;// Document,&lt;BR /&gt; [Seq-no],&lt;BR /&gt; [Cost-rate] * [Hours] AS [Actual-labor-cost]&lt;BR /&gt;FROM&lt;BR /&gt;"..\DataSources\[ST-TIME-SH].qvd"&lt;BR /&gt;(qvd)&lt;BR /&gt;WHERE EXISTS([Seq-no]);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 May 2010 06:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258701#M1204141</guid>
      <dc:creator>mjt_childrens</dc:creator>
      <dc:date>2010-05-20T06:16:36Z</dc:date>
    </item>
    <item>
      <title>2 Left Joins To One Table?</title>
      <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258702#M1204142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second and Third table is getting joined based on the SubCategory field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 May 2010 06:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258702#M1204142</guid>
      <dc:creator>deepakk</dc:creator>
      <dc:date>2010-05-20T06:34:20Z</dc:date>
    </item>
    <item>
      <title>2 Left Joins To One Table?</title>
      <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258703#M1204143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;I'm not sure I understand your answer. The second and third tables have 2 fields in common: Seq-no and SubCategory. I still don't understand why none of the data from the third join appears to be loaded.&lt;/P&gt;&lt;P&gt;I'm having problems switching my thinking from a Relational to an Associative database. Still waiting for my "AHA! I get it!" moment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 May 2010 15:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258703#M1204143</guid>
      <dc:creator>mjt_childrens</dc:creator>
      <dc:date>2010-05-20T15:21:12Z</dc:date>
    </item>
    <item>
      <title>2 Left Joins To One Table?</title>
      <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258704#M1204144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still not sure I understand why this didn't work but was able to work around the issue by taking a different approach to how I was loading the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 May 2010 04:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258704#M1204144</guid>
      <dc:creator>mjt_childrens</dc:creator>
      <dc:date>2010-05-21T04:25:42Z</dc:date>
    </item>
    <item>
      <title>2 Left Joins To One Table?</title>
      <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258705#M1204145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thompson,&lt;/P&gt;&lt;P&gt;The problem here is the key between 1st table and third table.1st you are joining 1st table and 2nd table with &lt;STRONG&gt;seq no&lt;/STRONG&gt; key.Then you are trying to join the o/p of 1st &amp;amp; 2nd table with 3rd table.&lt;/P&gt;&lt;P&gt;Key between the o/p table and 3rd table is seq no and SubCategory. Now this forms the composite primary key. While joining the o/p table and 3rd table Qlikview will look for the combination of keys and takes the data from 3rd table what ever is matching with the o/p of 1st &amp;amp; 2nd table.&lt;/P&gt;&lt;P&gt;Since 2nd table has SubCategory = 'Parts' and 3rd table has SubCategory = 'Labor' the combination never match , so it is not taking the data from the 3rd table to 1st table.&lt;/P&gt;&lt;P&gt;Hope this may help you.&lt;/P&gt;&lt;P&gt;-Peterson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 May 2010 07:35:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258705#M1204145</guid>
      <dc:creator />
      <dc:date>2010-05-21T07:35:47Z</dc:date>
    </item>
    <item>
      <title>2 Left Joins To One Table?</title>
      <link>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258706#M1204146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I think I understand now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 May 2010 14:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-Left-Joins-To-One-Table/m-p/258706#M1204146</guid>
      <dc:creator>mjt_childrens</dc:creator>
      <dc:date>2010-05-22T14:57:59Z</dc:date>
    </item>
  </channel>
</rss>

