<?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: Where Not Exists() not excluding data. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972045#M332652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Perhaps like this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&amp;nbsp; where not Exists([$(vPKName)]);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2015 06:12:31 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-10-01T06:12:31Z</dc:date>
    <item>
      <title>Where Not Exists() not excluding data.</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972044#M332651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As part of an Incremental load process I am following the pattern outlined by Steve Dark in his excellent Blog post here: &lt;A href="http://www.quickintelligence.co.uk/qlikview-incremental-load/" title="http://www.quickintelligence.co.uk/qlikview-incremental-load/"&gt;http://www.quickintelligence.co.uk/qlikview-incremental-load/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is, I am loading from a small qvd file extracted from a database, and then loading from a larger qvd file which contains the sum of all previous extracts. If the more recent extract contains an updated row, then I don't want to load that row from the existing file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;DataSource:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;Resident DataSource_Delta;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; // if there is already a qvd file, apend that to the loaded data&lt;/P&gt;&lt;P&gt;if not isnull(QvdCreateTime('DataSource.qvd')) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Concatenate (DataSource)&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load *&lt;/P&gt;&lt;P&gt;&amp;nbsp; from DataSource.qvd (qvd)&lt;/P&gt;&lt;P&gt;&amp;nbsp; where not Exists($(vPKName));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;// store the loaded period data to the filesystem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Almost all of this is driven by variables in external files - I have replaced variable names to protect the guilty... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, $(vPKName) is the Primary Key in the data. it is unique in the source database, so the idea is that if a Row exists in the DataSource_Delta.qvd file, it is more recent that the version in the file on disk (DataSource.qvd). Only one occurrence of that value can ever appear in a Delta file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the issue is that the where not exists does not appear to be excluding existing data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My resultant qvd file contains multiple entries for instances of the Primary Key value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone suggest if there are issues using dollar expansion to provide the name of the column in the source data in the exists clause, or is there another issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 15:32:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972044#M332651</guid>
      <dc:creator />
      <dc:date>2015-09-30T15:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Where Not Exists() not excluding data.</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972045#M332652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Perhaps like this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&amp;nbsp; where not Exists([$(vPKName)]);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 06:12:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972045#M332652</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-01T06:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Where Not Exists() not excluding data.</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972046#M332653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi, &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try like below..&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where Not Exists ('$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vPKName&lt;/SPAN&gt;)');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 07:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972046#M332653</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2015-10-01T07:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Where Not Exists() not excluding data.</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972047#M332654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would appear that the where not exists ( $(vPKName)) is actually working perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is an error in the previous stage of assembling the Delta fileset, and accepting multiple extracts into a single load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 09:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Not-Exists-not-excluding-data/m-p/972047#M332654</guid>
      <dc:creator />
      <dc:date>2015-10-01T09:09:53Z</dc:date>
    </item>
  </channel>
</rss>

