<?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 Cannot get a join to work correctly in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Cannot-get-a-join-to-work-correctly/m-p/2500269#M103100</link>
    <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I have two tables A &amp;amp; B.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I first need to load Table A and retrieve ALL of field DTNUM according to the below criteria.&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="429"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;Table A&amp;nbsp;&lt;/TD&gt;
&lt;TD width="365"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;DTNUM&lt;/TD&gt;
&lt;TD&gt;Cannot equal 0&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;PLWRK&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;must equal '0600', '0602', '5440', '5442', '4980', '3930', '544E'&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now for all the retrieved rows I need to get data from Table B according to below criteria. Only Where the DTNUM field from Table A matches the DTNUM field in Table B&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="132px" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="2" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" style="height: 15.0pt; width: 48pt;"&gt;Table B&lt;/TD&gt;
&lt;TD width="62.5938px" style="width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="62.5938px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" class="xl65" style="height: 15.0pt;"&gt;DTNUM&lt;/TD&gt;
&lt;TD width="62.5938px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" style="height: 15.0pt;"&gt;PLUMI&lt;/TD&gt;
&lt;TD width="62.5938px"&gt;Cannot equal 'B'&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are far more fields I need to include but have slimmed down for simplicity&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Table A]:
LOAD
    PLWRK,
    DTNUM
where not match (DTNUM,'0000000000');

[Table A]:
SELECT
PLWRK,
DTNUM,
FROM "X"
WHERE "PLWRK" IN ('0600', '0602', '5440', '5442', '4980', '3930', '544E')
;

Table B:

LIB CONNECT TO [X];

Left Join ([Table A])
LOAD
    DTNUM,
    PLUMI,
 WHERE NOT MATCH (PLUMI, 'B');

[Table B]:
SELECT 
DTNUM,
PLUMI,
FROM "X"
;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the above it will cause no errors but the rows retrieved do not match the criteria.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Assistance Is greatly received&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TIA&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2025 14:45:55 GMT</pubDate>
    <dc:creator>MikeGaunt1</dc:creator>
    <dc:date>2025-01-07T14:45:55Z</dc:date>
    <item>
      <title>Cannot get a join to work correctly</title>
      <link>https://community.qlik.com/t5/App-Development/Cannot-get-a-join-to-work-correctly/m-p/2500269#M103100</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I have two tables A &amp;amp; B.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I first need to load Table A and retrieve ALL of field DTNUM according to the below criteria.&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="429"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;Table A&amp;nbsp;&lt;/TD&gt;
&lt;TD width="365"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;DTNUM&lt;/TD&gt;
&lt;TD&gt;Cannot equal 0&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;PLWRK&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;must equal '0600', '0602', '5440', '5442', '4980', '3930', '544E'&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now for all the retrieved rows I need to get data from Table B according to below criteria. Only Where the DTNUM field from Table A matches the DTNUM field in Table B&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="132px" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="2" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" style="height: 15.0pt; width: 48pt;"&gt;Table B&lt;/TD&gt;
&lt;TD width="62.5938px" style="width: 48pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" style="height: 15.0pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="62.5938px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" class="xl65" style="height: 15.0pt;"&gt;DTNUM&lt;/TD&gt;
&lt;TD width="62.5938px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="68.7656px" height="20" style="height: 15.0pt;"&gt;PLUMI&lt;/TD&gt;
&lt;TD width="62.5938px"&gt;Cannot equal 'B'&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are far more fields I need to include but have slimmed down for simplicity&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Table A]:
LOAD
    PLWRK,
    DTNUM
where not match (DTNUM,'0000000000');

[Table A]:
SELECT
PLWRK,
DTNUM,
FROM "X"
WHERE "PLWRK" IN ('0600', '0602', '5440', '5442', '4980', '3930', '544E')
;

Table B:

LIB CONNECT TO [X];

Left Join ([Table A])
LOAD
    DTNUM,
    PLUMI,
 WHERE NOT MATCH (PLUMI, 'B');

[Table B]:
SELECT 
DTNUM,
PLUMI,
FROM "X"
;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the above it will cause no errors but the rows retrieved do not match the criteria.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Assistance Is greatly received&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TIA&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 14:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cannot-get-a-join-to-work-correctly/m-p/2500269#M103100</guid>
      <dc:creator>MikeGaunt1</dc:creator>
      <dc:date>2025-01-07T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get a join to work correctly</title>
      <link>https://community.qlik.com/t5/App-Development/Cannot-get-a-join-to-work-correctly/m-p/2500270#M103101</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Have you tried inner join instead of left join?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 14:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Cannot-get-a-join-to-work-correctly/m-p/2500270#M103101</guid>
      <dc:creator>Clement15</dc:creator>
      <dc:date>2025-01-07T14:53:41Z</dc:date>
    </item>
  </channel>
</rss>

