<?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 Anti Join in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124583#M91511</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186037"&gt;@U_Waqar&lt;/a&gt;&amp;nbsp; simply do a Right Join as such&lt;/P&gt;
&lt;P&gt;[Table A]:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo&lt;BR /&gt;11&lt;BR /&gt;22&lt;BR /&gt;33&lt;BR /&gt;44&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Right Join&lt;BR /&gt;[Table B]:&lt;BR /&gt;Load &lt;BR /&gt;Policy_No as PolNo&lt;BR /&gt;Inline [&lt;BR /&gt;Policy_No&lt;BR /&gt;11,&lt;BR /&gt;22,&lt;BR /&gt;55,&lt;BR /&gt;66&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2023 07:55:20 GMT</pubDate>
    <dc:creator>BrunPierre</dc:creator>
    <dc:date>2023-10-03T07:55:20Z</dc:date>
    <item>
      <title>Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124574#M91509</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;Thanks in advance. I have a scenario with 2 tables as:&lt;/P&gt;
&lt;P&gt;Take all the records from Table A and only take those records from Table B, which are not in Table A. (having one key as PolNo but also having other fields (not key fields) which need to show in report)&lt;/P&gt;
&lt;P&gt;Table A:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo&lt;BR /&gt;11&lt;BR /&gt;22&lt;BR /&gt;33&lt;BR /&gt;44&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Table B:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Policy_No&lt;BR /&gt;11,&lt;BR /&gt;22,&lt;BR /&gt;55,&lt;BR /&gt;66&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Expected Output:&lt;BR /&gt;PolNo&lt;BR /&gt;11 (from table A)&lt;BR /&gt;22 (from table A)&lt;BR /&gt;55 (from table B)&lt;BR /&gt;66 (from table B)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 07:33:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124574#M91509</guid>
      <dc:creator>U_Waqar</dc:creator>
      <dc:date>2023-10-03T07:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124583#M91511</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186037"&gt;@U_Waqar&lt;/a&gt;&amp;nbsp; simply do a Right Join as such&lt;/P&gt;
&lt;P&gt;[Table A]:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo&lt;BR /&gt;11&lt;BR /&gt;22&lt;BR /&gt;33&lt;BR /&gt;44&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Right Join&lt;BR /&gt;[Table B]:&lt;BR /&gt;Load &lt;BR /&gt;Policy_No as PolNo&lt;BR /&gt;Inline [&lt;BR /&gt;Policy_No&lt;BR /&gt;11,&lt;BR /&gt;22,&lt;BR /&gt;55,&lt;BR /&gt;66&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 07:55:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124583#M91511</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-10-03T07:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124590#M91513</link>
      <description>&lt;P&gt;Thanks for your response.&lt;/P&gt;
&lt;P&gt;With simple right join i get matching records data from Table B whereas for matching records i want to get data from table and for unmatch records from Table B.&lt;/P&gt;
&lt;P&gt;Also I want to keep the flag of both tables which later need to show in report&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 08:06:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124590#M91513</guid>
      <dc:creator>U_Waqar</dc:creator>
      <dc:date>2023-10-03T08:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124636#M91522</link>
      <description>&lt;P&gt;Is this not the result you expected?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrunPierre_0-1696325293017.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117538i6B88DC1EE2B54047/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrunPierre_0-1696325293017.png" alt="BrunPierre_0-1696325293017.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 09:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124636#M91522</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-10-03T09:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124675#M91531</link>
      <description>&lt;P&gt;yes this is the expected output but the other columns data also should come from same tables as:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Expected Output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PolNo&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;11 (all other columns/fields should be from table A)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;22 (all other columns/fields should be from table A)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;55 (all other columns/fields should be from table B)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;66 (all other columns/fields should be from table B)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Take all the Policies (with other fields) from Table A and only take those Polices from Table B which are not in Table A.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 11:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124675#M91531</guid>
      <dc:creator>U_Waqar</dc:creator>
      <dc:date>2023-10-03T11:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124887#M91547</link>
      <description>&lt;P&gt;G'day&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186037"&gt;@U_Waqar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In your original post, you say:&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Take all the records from Table A and only take those records from Table B, which are not in Table A.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;According to that logic, you should get rows: 11, 22, 33, 44, 55, 66. If this is the case, then the answer is to concatenate with a "where not exists" on the key field.&lt;/P&gt;
&lt;P&gt;What is the reason that you don't want 33 and 44? Do you only want rows from Table A that are also in Table B? If this is the case, then here's the logic:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TableC:
noconcatenate load PolNo, &amp;lt;other A fields&amp;gt;
resident TableA where exists( Policy_No, PolNo );

concatenate (TableC) load Policy_No as PolNo, &amp;lt;other B fields&amp;gt;
resident TableB where not exists( P, Policy_No );&lt;/LI-CODE&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 23:17:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124887#M91547</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2023-10-03T23:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124927#M91549</link>
      <description>&lt;P&gt;Thanks for your response&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/2856"&gt;@barnabyd&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry my bad i forgot to mention 33,44 in expected output. The final table should be like:&lt;/P&gt;
&lt;P&gt;Expected Output:&lt;BR /&gt;PolNo:&lt;BR /&gt;11 (all the other fields should be taken from table A only)&lt;BR /&gt;22 (all the other fields should be taken from table A only)&lt;BR /&gt;33 (all the other fields should be taken from table A only)&lt;BR /&gt;44 (all the other fields should be taken from table A only)&lt;BR /&gt;55 (all the other fields should be taken from table B only)&lt;BR /&gt;66 (all the other fields should be taken from table B only)&lt;/P&gt;
&lt;P&gt;How can I achieve this output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your mentioned solution, what you are referring to "P"&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;resident TableB where not exists( P, Policy_No &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124927#M91549</guid>
      <dc:creator>U_Waqar</dc:creator>
      <dc:date>2023-10-04T08:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124945#M91551</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186037"&gt;@U_Waqar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simply use an outer join in your script:&lt;/P&gt;
&lt;P&gt;A:&lt;BR /&gt;load&lt;BR /&gt;...&lt;BR /&gt;from [xyz.qvd];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;outer join (A)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;B:&lt;BR /&gt;load&lt;BR /&gt;...&lt;BR /&gt;from [abc.qvd];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124945#M91551</guid>
      <dc:creator>Aditya_Chitale</dc:creator>
      <dc:date>2023-10-04T06:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124957#M91552</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186037"&gt;@U_Waqar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Let me tell you the simplest way to achieve this output.&lt;/P&gt;
&lt;P&gt;You want all the records from TableA and only unmatched record from TableB.&lt;/P&gt;
&lt;P&gt;Try this out:&lt;/P&gt;
&lt;P&gt;TableA:&lt;BR /&gt;Load *, &lt;BR /&gt;'A' as Flag;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo&lt;BR /&gt;11&lt;BR /&gt;22&lt;BR /&gt;33&lt;BR /&gt;44&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TableB:&lt;BR /&gt;Load *&lt;BR /&gt;Where Not Exists(PolNo);&lt;BR /&gt;Load *,&lt;BR /&gt;'B' as Flag;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo&lt;BR /&gt;11&lt;BR /&gt;22&lt;BR /&gt;55&lt;BR /&gt;66&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Flag indicate from which table records is coming.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tanish_0-1696401398815.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117586i2FB63F37ACD190B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tanish_0-1696401398815.png" alt="Tanish_0-1696401398815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this will be helpful.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Tanish&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 06:38:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2124957#M91552</guid>
      <dc:creator>Tanish</dc:creator>
      <dc:date>2023-10-04T06:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2125025#M91556</link>
      <description>&lt;P&gt;Its not working accurately. Its only giving records from Table A.&lt;/P&gt;
&lt;P&gt;I am using concatenate btw table A and table B also with where not Exist logic while loading data from Table B.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2125025#M91556</guid>
      <dc:creator>U_Waqar</dc:creator>
      <dc:date>2023-10-04T08:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2125071#M91561</link>
      <description>&lt;P&gt;Use of &lt;SPAN&gt;concatenate&amp;nbsp;is not required, as you can see in the above response i have not used&amp;nbsp;concatenate&amp;nbsp;anywhere still im getting the result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more clarity, i have added 1 more column for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TableA:&lt;BR /&gt;Load *, &lt;BR /&gt;'A' as Flag;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo , DESC&lt;BR /&gt;11,&amp;nbsp; &amp;nbsp;11A&lt;BR /&gt;22&amp;nbsp; , 22A&lt;BR /&gt;33,&amp;nbsp; 33A&lt;BR /&gt;44,&amp;nbsp; 44A&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TableB:&lt;BR /&gt;Load *&lt;BR /&gt;Where Not Exists(PolNo);&lt;BR /&gt;Load *,&lt;BR /&gt;'B' as Flag;&lt;BR /&gt;Load * Inline [&lt;BR /&gt;PolNo , DESC&lt;BR /&gt;11,&amp;nbsp; &amp;nbsp; 11B&lt;BR /&gt;22,&amp;nbsp; &amp;nbsp;22B&lt;BR /&gt;55,&amp;nbsp; &amp;nbsp;55B&lt;BR /&gt;66,&amp;nbsp; &amp;nbsp;66B&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tanish_0-1696416170296.png" style="width: 318px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/117600i6EDF5284AC50E54B/image-dimensions/318x506?v=v2" width="318" height="506" role="button" title="Tanish_0-1696416170296.png" alt="Tanish_0-1696416170296.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Record with suffix A is from &lt;STRONG&gt;TableA&lt;/STRONG&gt; and records with suffix B is from &lt;STRONG&gt;TableB&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 10:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2125071#M91561</guid>
      <dc:creator>Tanish</dc:creator>
      <dc:date>2023-10-04T10:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Left Anti Join</title>
      <link>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2126389#M91668</link>
      <description>&lt;P&gt;G'day&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186037"&gt;@U_Waqar&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If 11, 22, 33, 44, 55, 66 the expected outcome then the code is much simpler. You could use an outer join as suggested by&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/79864"&gt;@Aditya_Chitale&lt;/a&gt;&amp;nbsp;but I prefer to concatenate selected rows from TableB into TableA (I think&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/188612"&gt;@Tanish&lt;/a&gt;'s solution is pretty close). Here's my version:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;concatenate (TableA)
load Policy_No as PolNo, &amp;lt;other B fields&amp;gt;
resident TableB where not exists( PolNo, Policy_No );
drop table TableB;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Also, the 'P' in my previous script should have been 'PolNo' - sorry)&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 00:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Left-Anti-Join/m-p/2126389#M91668</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2023-10-09T00:06:17Z</dc:date>
    </item>
  </channel>
</rss>

