<?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 QV9 vs QV10: Exists() in Where statement has different behavior in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171319#M41366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I run with QV10 some of my applications developed in QV9 and almost all worked fine. But some of them failed. I found that when I use a LOAD statement with a WHERE Not Exists(...) QV10 produce a different result than QV9.&lt;/P&gt;&lt;P&gt;I create an example application to show the difference. The load script is:&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; F1, F2&lt;BR /&gt; A, 1&lt;BR /&gt; A, 2&lt;BR /&gt; A, 3&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Table2:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; KeyField, Data&lt;BR /&gt; B, 1&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;CONCATENATE (Table2)&lt;/P&gt;&lt;P&gt;LOAD F1 AS KeyField&lt;BR /&gt; , F2 AS Data&lt;BR /&gt;RESIDENT Table&lt;BR /&gt;WHERE NOT Exists(KeyField, F1);&lt;/P&gt;&lt;P&gt;DROP TABLE Table;&lt;/P&gt;&lt;P&gt;After running the app in QV9 and QV10 Table2 has the following content:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3278_sourceID:3278" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV9 doesn't inserts in Table2 repeated values of KeyField, like if it ignores values already inserted by LOAD statement. On the other hand, QV10 only ignores values on KeyField loaded before the LOAD statement.&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.01.15.11.Posted/QV9-vs-QV10-_2D00_-Exists.qvw]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Jan 2011 21:39:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-15T21:39:53Z</dc:date>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171319#M41366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I run with QV10 some of my applications developed in QV9 and almost all worked fine. But some of them failed. I found that when I use a LOAD statement with a WHERE Not Exists(...) QV10 produce a different result than QV9.&lt;/P&gt;&lt;P&gt;I create an example application to show the difference. The load script is:&lt;/P&gt;&lt;P&gt;Table:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; F1, F2&lt;BR /&gt; A, 1&lt;BR /&gt; A, 2&lt;BR /&gt; A, 3&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Table2:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; KeyField, Data&lt;BR /&gt; B, 1&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;CONCATENATE (Table2)&lt;/P&gt;&lt;P&gt;LOAD F1 AS KeyField&lt;BR /&gt; , F2 AS Data&lt;BR /&gt;RESIDENT Table&lt;BR /&gt;WHERE NOT Exists(KeyField, F1);&lt;/P&gt;&lt;P&gt;DROP TABLE Table;&lt;/P&gt;&lt;P&gt;After running the app in QV9 and QV10 Table2 has the following content:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3278_sourceID:3278" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV9 doesn't inserts in Table2 repeated values of KeyField, like if it ignores values already inserted by LOAD statement. On the other hand, QV10 only ignores values on KeyField loaded before the LOAD statement.&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.01.15.11.Posted/QV9-vs-QV10-_2D00_-Exists.qvw]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jan 2011 21:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171319#M41366</guid>
      <dc:creator />
      <dc:date>2011-01-15T21:39:53Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171320#M41367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Damian,&lt;/P&gt;&lt;P&gt;Let us take the things apart from Qv9 and Qv10 . Let us consider the Concatenate and Not Exists function . According to your example the output using these two functions will be the result that is displayed in QV10. Logically the output which is displayed in QV9 is not correct . Just check your release version in QV9 and upgrade if necessary .&lt;/P&gt;&lt;P&gt;As you said QV9 doesn't inserts in Table2 repeated values of KeyField, like if it ignores values already inserted by LOAD statement. On the other hand, QV10 only ignores values on KeyField loaded before the LOAD statement.Let me have a look and update you on this .&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chakravarthy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jan 2011 04:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171320#M41367</guid>
      <dc:creator />
      <dc:date>2011-01-16T04:57:19Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171321#M41368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chakravarthy,&lt;/P&gt;&lt;P&gt;Sure! The bug in QV9 SR6 keep hidden some potencial bugs in my applications.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;dd. //&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jan 2011 12:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171321#M41368</guid>
      <dc:creator />
      <dc:date>2011-01-16T12:41:52Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171322#M41369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Damian, recently moved to qv10 desktopn client for testing and can verify this change in behaviour.&lt;/P&gt;&lt;P&gt;I've been playing around with load statements and found that if I simply add in an additional field "rowno()" to Table2 (i.e. the table I want to constrain) my "not exists" clause behaves as intended and I only get 1 row per constraining value.&lt;/P&gt;&lt;P&gt;Try this out&lt;/P&gt;&lt;P&gt;Cheers, Jason&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 13:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171322#M41369</guid>
      <dc:creator />
      <dc:date>2011-02-16T13:45:27Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171323#M41370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the old behavior has been that way since I started using QlikView over five years ago, though I'm not certain. I don't consider it a bug. Both interpretations of exists() are perfectly logical.&lt;/P&gt;&lt;P&gt;The new way, exists() means "existed prior to this load". That's logical. Most of the time, in practical use at our company, that's what we're trying to do.&lt;/P&gt;&lt;P&gt;The old way, exists() means "exists PERIOD". That is ALSO logical. As soon as you add a value to your new table, it exists, does it not? Therefore, exists() detects that value. If you meant that it existed prior to your load, you could accomplish that by creating a duplicate ID in the old table(s) that you don't load in the new table.&lt;/P&gt;&lt;P&gt;The old way also supported certain functionality that seems like it will be more difficult in version 10. For instance, taking the first row for a given ID from some input:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD * INLINE [&lt;BR /&gt;Dispute ID, ID&lt;BR /&gt;US-42354,US-1161514&lt;BR /&gt;US-42355,US-1870004&lt;BR /&gt;US-42355,US-1985414 &amp;lt;-- this row will be skipped&lt;BR /&gt;US-42356,US-2025188]&lt;BR /&gt;WHERE not exists("Dispute ID");&lt;/P&gt;&lt;P&gt;This approach no longer works in version 10, and since version 9 wasn't a bug (just a different logical interpretation of exists()), I'm unhappy with it being changed from a backwards compatibility perspective. Now, to switch to version 10, I have to track down anywhere we might be taking advantage of the old interpretation of exists().&lt;/P&gt;&lt;P&gt;Also, I'm not yet seeing a way as clean and fast as the above to duplicate the functionality in version 10. This works, but requires two loads, and assumes we want the lowest rather than first ID:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;data:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Dispute ID, ID&lt;BR /&gt;US-42354,US-1161514&lt;BR /&gt;US-42355,US-1870004&lt;BR /&gt;US-42355,US-1985414&lt;BR /&gt;US-42356,US-2025188];&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;final_data:&lt;BR /&gt;NOCONCATENATE&lt;BR /&gt;LOAD&lt;BR /&gt; "Dispute ID"&lt;BR /&gt;,minstring("ID") as "ID"&lt;BR /&gt;RESIDENT data&lt;BR /&gt;GROUP BY "Dispute ID"&lt;BR /&gt;;&lt;BR /&gt;DROP TABLE data;&lt;/P&gt;&lt;P&gt;I can think of other ways to solve it, but none as clean as what was available in version 9, which I consider now broken in version 10.&lt;/P&gt;&lt;P&gt;Perhaps QlikTech should have introduced a new function, existedbeforethisload(), to behave the new way, instead of breaking the existing function. I'm sure there's a shorter name, but that's the idea. Or perhaps they should have added a parameter to control the desired behavior, defaulting to the approach it had always used before. Water under the bridge now, I suppose.&lt;/P&gt;&lt;P&gt;Our applications breaking every time we upgrade is one of the things I really hate about QlikView, particularly if there are ways to introduce desired functionality without breaking existing functionality, such as what I mentioned above for this particular case. I think QlikTech handles new versions pretty poorly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 20:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171323#M41370</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-23T20:22:54Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171324#M41371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;Thanks for identifying and explaining this. Have you logged this issue with Support?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 21:05:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171324#M41371</guid>
      <dc:creator />
      <dc:date>2011-02-23T21:05:35Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171325#M41372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't...&lt;/P&gt;&lt;P&gt;... and won't. The new behavior is, for I think most users most of the time, BETTER. I'd be surprised if the change wasn't completely intentional, and quite possibly due to user complaints about the old behavior.&lt;/P&gt;&lt;P&gt;I'm just upset with the way the change was handled, with the lack of backwards compatibility, not with the change itself. And at this point, with so many people having used QV10 for so long, the backwards compatibility argument is reversed. At this point, you wouldn't want to change it back, because a lot of QV10 users are surely counting on the new behavior.&lt;/P&gt;&lt;P&gt;So after a little grumbling, I'll accept that the new way is the new way. I might suggest on the customer portal as an idea that a parameter be added to give the old behavior. That would simplify fixing old code where the new behavior has broken it. But I actually doubt that the new behavior will break any of my applications in practice, even if I'll need to be certain before we upgrade. The example I gave was just an example, not something I pulled from one of our apps.&lt;/P&gt;&lt;P&gt;Thanks for your quick response, though. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 21:19:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171325#M41372</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-23T21:19:47Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171326#M41373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Now, to switch to version 10, I have to track down anywhere we might be taking advantage of the old interpretation of exists()."&lt;/P&gt;&lt;P&gt;That's exactly what I did before the upgrade. Nor I'm happy with the way the change was handled.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 22:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171326#M41373</guid>
      <dc:creator />
      <dc:date>2011-02-23T22:11:47Z</dc:date>
    </item>
    <item>
      <title>QV9 vs QV10: Exists() in Where statement has different behavior</title>
      <link>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171327#M41374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QV10 SR3 has news about this topic: "37002 'where not exists' is not working as expected". Where "as expected" seems to be "as in QV9".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested my sample app, and NOT Exists in QV10 SR3 has the same behavior than QV9.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 19:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV9-vs-QV10-Exists-in-Where-statement-has-different-behavior/m-p/171327#M41374</guid>
      <dc:creator />
      <dc:date>2011-07-13T19:13:24Z</dc:date>
    </item>
  </channel>
</rss>

