<?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 Left Join on resident tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358339#M705436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't a preceding load do the trick?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[HYP3]:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if( [short_policy]='Global' and [n carrier] = '000253', 'Global2', null()) as [Filter_Global];&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [n cli],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [n carrier],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [contracts],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [policy],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [n invoice]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if([n carrier] = '000253', if(left([policy], 3)='920', 'Global', if(left([policy], 3)='609', 'Global', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'General'))) as [short_policy]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; resident [HYP2];&lt;/P&gt;&lt;P&gt;drop table [HYP2];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 17:58:21 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2012-03-19T17:58:21Z</dc:date>
    <item>
      <title>Left Join on resident tables</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358338#M705435</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 getting a little bit frustrated here. Seems fairly easy but I just can't figure it out. Please someone help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following script. This is just the last part where I'm stucked; I have already defined HYP2 table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[HYP3]:&lt;/P&gt;&lt;P&gt;LOAD [n cli],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [n carrier],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [contracts],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [policy],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [n invoice]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([n carrier] = '000253', if(left([policy], 3)='920', 'Global', if(left([policy], 3)='609', 'Global', 'General'))) as [short_policy]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resident [HYP2];&lt;/P&gt;&lt;P&gt;drop table [HYP2];&lt;/P&gt;&lt;P&gt;//about 30k rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[temp]:&lt;/P&gt;&lt;P&gt;LOAD [n cli], [n carrier], 'Global2' as [Filter_Global] resident [HYP3] where [short_policy]='Global' and [n carrier] = '000253';&lt;/P&gt;&lt;P&gt;//result is 100 rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Up to here, no problem. Now all I want to do is create one table that holds all the 30k rows plus the [Filter_Global] field where the conditions are fullfilled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this hell of a left join????? And what tables should I then drop? &lt;/P&gt;&lt;P&gt;The result should provide a table made up of 30k rows but with more then 100 values in the [Filter_Global] field since each [n cli] may have more [contracts].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, if you have the solution. Thank anyway for giving it a shot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 16:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358338#M705435</guid>
      <dc:creator />
      <dc:date>2012-03-19T16:57:21Z</dc:date>
    </item>
    <item>
      <title>Left Join on resident tables</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358339#M705436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wouldn't a preceding load do the trick?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[HYP3]:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if( [short_policy]='Global' and [n carrier] = '000253', 'Global2', null()) as [Filter_Global];&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [n cli],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [n carrier],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [contracts],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [policy],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [n invoice]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if([n carrier] = '000253', if(left([policy], 3)='920', 'Global', if(left([policy], 3)='609', 'Global', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'General'))) as [short_policy]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; resident [HYP2];&lt;/P&gt;&lt;P&gt;drop table [HYP2];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 17:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358339#M705436</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-03-19T17:58:21Z</dc:date>
    </item>
    <item>
      <title>Left Join on resident tables</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358340#M705437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Henric, &lt;/P&gt;&lt;P&gt;thanky for your reply. I tried implementing a preceding load, but what happens is that the first load limits the second load to only those values for the conditions in the firs load are fullfilled. &lt;/P&gt;&lt;P&gt;In other words, the two loads are not loading all the 30k rows adding the 'Global' tag to some rows, but loading only those rows that have the 'Global' tag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say now, with these two loads I have the 100+ rows marked. How can I add all the rows the original rows excluding repetitions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 07:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358340#M705437</guid>
      <dc:creator />
      <dc:date>2012-03-20T07:55:34Z</dc:date>
    </item>
    <item>
      <title>Left Join on resident tables</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358341#M705438</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;Just replace the &lt;STRONG&gt;[temp]:&lt;/STRONG&gt; label with &lt;STRONG&gt;left join (HYP3)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;That should work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(Would give you the full code, but for some reason I cannot paste into a forum post from this PC)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 08:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358341#M705438</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-03-20T08:03:07Z</dc:date>
    </item>
    <item>
      <title>Left Join on resident tables</title>
      <link>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358342#M705439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should avoid Left Joins in this case, because it will potentially change the number of records and you do not want this. (It &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;will &lt;/STRONG&gt;&lt;/SPAN&gt;if you have multiple records with the same combination of [n cli] and [n carrier].)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion does not contain a where-clause in the preceding Load, so it will not change the number of records. I.e. if you have 30k records in the "LOAD ... resident [HYP2]", then you will have the same number after the preceding Load also. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you want to define the [Filter_Global] from these 30k records, right? Then a preceding Load is the correct way to do it. Or am I missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/HIC &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 13:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-Join-on-resident-tables/m-p/358342#M705439</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-03-20T13:03:38Z</dc:date>
    </item>
  </channel>
</rss>

