<?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: &amp;quot;Where Not Exists&amp;quot; not working as expected in Data Movement &amp; Streaming</title>
    <link>https://community.qlik.com/t5/Data-Movement-Streaming/quot-Where-Not-Exists-quot-not-working-as-expected/m-p/2423660#M1916</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suggest swapping the order of the fields in your "WHERE NOT EXISTS" query and renaming the fields in your first three tables from BTKBCH to BTKBCH2:&lt;/P&gt;
&lt;P&gt;Change from:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;where not exists(MissingCode, BTKBCH2);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;TO&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;where not exists(BTKBCH2, MissingCode);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I believe this adjustment will address the issue you're encountering. For further clarification, you can refer to the following post:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/WHERE-NOT-EXISTS-clause-returns-only-one-row-for-each-non/ta-p/1716931" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Official-Support-Articles/WHERE-NOT-EXISTS-clause-returns-only-one-row-for-each-non/ta-p/1716931&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Best regards Son&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 16:21:21 GMT</pubDate>
    <dc:creator>PhanThanhSon</dc:creator>
    <dc:date>2024-02-26T16:21:21Z</dc:date>
    <item>
      <title>"Where Not Exists" not working as expected</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/quot-Where-Not-Exists-quot-not-working-as-expected/m-p/2423655#M1915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;please watch this script:&lt;/P&gt;
&lt;P&gt;---------&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;KOrd31:&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Load *&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;From [lib://Database:DataFiles/KOrd31_demo.qvd] (qvd);&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;// create a table with distinct BTKBCH field&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;TabBch:&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; Load distinct&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; BTKBCH&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; resident KOrd31&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; where BTKBCH &amp;gt; ' &amp;nbsp; &amp;nbsp; ';&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;// load description&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Left join&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; BTKBCH,&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; Description&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;From [lib://Database:DataFiles/BchTab_demo.qvd] (qvd);&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;// only 2 codes match, i'd like to avoid null descriptions&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;// ENHANCE MISSING CODES&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Concatenate(TabBch)&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Load DISTINCT&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;BTKBCH,&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;BTKBCH as MissingCode,&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; '*** Missing code ***' as Description&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;resident KOrd31&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;where not exists(MissingCode, BTKBCH);&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;drop Field MissingCode;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Exit Script;&lt;/EM&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;P&gt;---------&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;All the records are loaded again in table TabBch, not only missing codes. What's wrong?&lt;/DIV&gt;
&lt;DIV&gt;Thank you, very much.&lt;/DIV&gt;
&lt;DIV&gt;Antonio&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Mar 2025 22:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/quot-Where-Not-Exists-quot-not-working-as-expected/m-p/2423655#M1915</guid>
      <dc:creator>qvdrago</dc:creator>
      <dc:date>2025-03-19T22:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: "Where Not Exists" not working as expected</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/quot-Where-Not-Exists-quot-not-working-as-expected/m-p/2423660#M1916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suggest swapping the order of the fields in your "WHERE NOT EXISTS" query and renaming the fields in your first three tables from BTKBCH to BTKBCH2:&lt;/P&gt;
&lt;P&gt;Change from:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;where not exists(MissingCode, BTKBCH2);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;TO&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;where not exists(BTKBCH2, MissingCode);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I believe this adjustment will address the issue you're encountering. For further clarification, you can refer to the following post:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/WHERE-NOT-EXISTS-clause-returns-only-one-row-for-each-non/ta-p/1716931" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Official-Support-Articles/WHERE-NOT-EXISTS-clause-returns-only-one-row-for-each-non/ta-p/1716931&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Best regards Son&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 16:21:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/quot-Where-Not-Exists-quot-not-working-as-expected/m-p/2423660#M1916</guid>
      <dc:creator>PhanThanhSon</dc:creator>
      <dc:date>2024-02-26T16:21:21Z</dc:date>
    </item>
  </channel>
</rss>

