<?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: How to use QV function WHERE exists for qvd optimized load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528940#M684882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the idea! I didn't know this way to do an optimized load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I understood, you are asking how you could do a combination of conditions. I think you could do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suposing that we will loading like:&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;From table.qvd&lt;/P&gt;&lt;P&gt;Where (a=100 and b=78) or (b=500 and a=69);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you could do:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TEMP: &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load * inline &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[a, b&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;100, 78&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;69,&amp;nbsp;&amp;nbsp; 500&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left join&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load Distinct a, b, a&amp;amp;'_'&amp;amp;b as a_b Resident TEMP;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Table:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From table.qvd(qvd)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where exists (a&amp;amp;'_'&amp;amp;b, a_b);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I dont know if this will be optimized, but you can try at less!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2014 14:09:59 GMT</pubDate>
    <dc:creator>sebastiandperei</dc:creator>
    <dc:date>2014-01-17T14:09:59Z</dc:date>
    <item>
      <title>How to use QV function WHERE exists for qvd optimized load</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528939#M684881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not so sure if you&lt;BR /&gt;already know and use following trick. The first time I was disappointed with&lt;BR /&gt;loading performance from qvd using where condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load FIELD from My.qvd&lt;BR /&gt;(qvd) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE&lt;BR /&gt;FIELD2='Value_for_condition';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loading from big files took&lt;BR /&gt;really long and condition caused not optimized load. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Define temporary table&lt;BR /&gt;using load * inline [];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) using this temp table in&lt;BR /&gt;condition as where exists ();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load * inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[FIELD2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value_for_or_condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value_for_or_condition2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load FIELD, FIELD2 from&lt;BR /&gt;My.qvd (qvd) WHERE EXISTS ([FIELD2]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table TEMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, this has certain&lt;BR /&gt;issues. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Field used in a condition&lt;BR /&gt;has to be selected as well, even if it is not needed (otherwise not qvd optimized)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- two loads load *, x&amp;amp;z&lt;BR /&gt;as y; load * from (qvd); -&amp;gt; is slow, not a qvd optimized&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- two condition fileds are&lt;BR /&gt;not possible with where exists -&amp;gt; FIELD2='11' AND FIELD3='22' -&amp;gt; causes&lt;BR /&gt;not optimized qvd load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you handle more&lt;BR /&gt;combined where conditions or transformation while loading from qvd file? (where&lt;BR /&gt;data in qvd are not in the needed format for any reason)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 13:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528939#M684881</guid>
      <dc:creator />
      <dc:date>2014-01-17T13:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use QV function WHERE exists for qvd optimized load</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528940#M684882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the idea! I didn't know this way to do an optimized load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I understood, you are asking how you could do a combination of conditions. I think you could do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suposing that we will loading like:&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;From table.qvd&lt;/P&gt;&lt;P&gt;Where (a=100 and b=78) or (b=500 and a=69);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you could do:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TEMP: &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load * inline &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[a, b&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;100, 78&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;69,&amp;nbsp;&amp;nbsp; 500&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left join&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load Distinct a, b, a&amp;amp;'_'&amp;amp;b as a_b Resident TEMP;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Table:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From table.qvd(qvd)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Where exists (a&amp;amp;'_'&amp;amp;b, a_b);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I dont know if this will be optimized, but you can try at less!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 14:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528940#M684882</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2014-01-17T14:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use QV function WHERE exists for qvd optimized load</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528941#M684883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , If you concatenate in the where exists function , it changed qvd load as un-optimized load. In this case in the QVD loader we need to create the composite keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------- QVD Loader -------&lt;/P&gt;&lt;P&gt;TABLENAME:&lt;/P&gt;&lt;P&gt;LOAD * , A&amp;amp;'-'&amp;amp;B AS KEY;&lt;/P&gt;&lt;P&gt;SELECT * FROM TABLENAME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE TABLENAME into TABLENAME.qvd (qvd) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------- MAIN QVW --------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP:&lt;/P&gt;&lt;P&gt;LOAD A &amp;amp; '-' &amp;amp; B AS KEY INLINE [&lt;/P&gt;&lt;P&gt;A , B&lt;/P&gt;&lt;P&gt;10, 100&lt;/P&gt;&lt;P&gt;32, 165&lt;/P&gt;&lt;P&gt;45, 90&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * TABLENAME.qvd (qvd)&lt;/P&gt;&lt;P&gt;Where EXISTS(KEY);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table TEMP ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Load keeps Optimized load. If you are not doing any incremental load , use Autonumber functions for composite keys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jan 2014 00:58:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528941#M684883</guid>
      <dc:creator />
      <dc:date>2014-01-18T00:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use QV function WHERE exists for qvd optimized load</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528942#M684884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking about the same composite key approach. However you can never know if there won't be a similar need with another concatenated key. Then there has to be another A&amp;amp;C field.&lt;/P&gt;&lt;P&gt;In a selection, all possible combinations should be given, not just where Field (A,B,C) AND Field2(D,E,F). You should know then combinations like AD, AE, AF, BD, BE, BF ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I will keep it on my mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 06:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-QV-function-WHERE-exists-for-qvd-optimized-load/m-p/528942#M684884</guid>
      <dc:creator />
      <dc:date>2014-01-20T06:54:20Z</dc:date>
    </item>
  </channel>
</rss>

