<?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 Where Exists Mechanics in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-Exists-Mechanics/m-p/1089889#M937612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a set of invoice headers in a QVD extracted from the source database.&amp;nbsp; The QVD is a subset of all the possible headers on the source database ( an AS400 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now want to load all the detail lines from the AS400 source system for the invoices in the QVD.&amp;nbsp;&amp;nbsp; I believe I can do it using the WHERE EXISTS option.&amp;nbsp; If I do this I believe all of the details table will be loaded into memory on my PC from the AS400 and then the WHERE EXISTS will be processed.&amp;nbsp;&amp;nbsp; Is this true?&amp;nbsp; If this is the case I am better off doing a join and header selection on the AS400 and returning the results for better performance as the details file is huge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;The WHERE EXISTS option&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[HEADERS]:&lt;BR /&gt;LOAD DISTINCT BRE19 AS KNT08&lt;BR /&gt;FROM&lt;BR /&gt;[HEADERS.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ODBC CONNECT TO QLIKVIEW_AS400_ODBC;&lt;BR /&gt;[DETAILS]:&lt;BR /&gt;LOAD KNT01,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT02,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT03,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT04,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT05,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT06,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT07,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT08&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE EXISTS(KNT08);&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM AS400.BIGDETAIL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;The AS400 Option Including the Condition Used To Create The QVD Headers File&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO QLIKVIEW_AS400_ODBC;&lt;/P&gt;&lt;P&gt;[DETAILS]:&lt;/P&gt;&lt;P&gt;LOAD KNT01,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT02,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT03,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT04,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT05,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT06,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT07,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT08&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM&amp;nbsp; AS400.HEADER H&lt;/P&gt;&lt;P&gt;LEFT JOIN BIGDETAIL BD ON&amp;nbsp; H.KNT08&amp;nbsp;&amp;nbsp; = BD.BRE19 &lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; H.BRE35 = 2015;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 11:54:36 GMT</pubDate>
    <dc:creator>rebelfox</dc:creator>
    <dc:date>2016-02-10T11:54:36Z</dc:date>
    <item>
      <title>Where Exists Mechanics</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-Mechanics/m-p/1089889#M937612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a set of invoice headers in a QVD extracted from the source database.&amp;nbsp; The QVD is a subset of all the possible headers on the source database ( an AS400 ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now want to load all the detail lines from the AS400 source system for the invoices in the QVD.&amp;nbsp;&amp;nbsp; I believe I can do it using the WHERE EXISTS option.&amp;nbsp; If I do this I believe all of the details table will be loaded into memory on my PC from the AS400 and then the WHERE EXISTS will be processed.&amp;nbsp;&amp;nbsp; Is this true?&amp;nbsp; If this is the case I am better off doing a join and header selection on the AS400 and returning the results for better performance as the details file is huge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;The WHERE EXISTS option&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[HEADERS]:&lt;BR /&gt;LOAD DISTINCT BRE19 AS KNT08&lt;BR /&gt;FROM&lt;BR /&gt;[HEADERS.qvd]&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ODBC CONNECT TO QLIKVIEW_AS400_ODBC;&lt;BR /&gt;[DETAILS]:&lt;BR /&gt;LOAD KNT01,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT02,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT03,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT04,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT05,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT06,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT07,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT08&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE EXISTS(KNT08);&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM AS400.BIGDETAIL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;The AS400 Option Including the Condition Used To Create The QVD Headers File&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO QLIKVIEW_AS400_ODBC;&lt;/P&gt;&lt;P&gt;[DETAILS]:&lt;/P&gt;&lt;P&gt;LOAD KNT01,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT02,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT03,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT04,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT05,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT06,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT07,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KNT08&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM&amp;nbsp; AS400.HEADER H&lt;/P&gt;&lt;P&gt;LEFT JOIN BIGDETAIL BD ON&amp;nbsp; H.KNT08&amp;nbsp;&amp;nbsp; = BD.BRE19 &lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; H.BRE35 = 2015;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 11:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-Mechanics/m-p/1089889#M937612</guid>
      <dc:creator>rebelfox</dc:creator>
      <dc:date>2016-02-10T11:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Where Exists Mechanics</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Exists-Mechanics/m-p/1089890#M937613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, the WHERE EXISTS() in your example is executed on your PC, while the SQL statement is executed on the server and will send all lines to your PC for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So limiting the lines using SQL would probably be better here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 12:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Exists-Mechanics/m-p/1089890#M937613</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-10T12:38:03Z</dc:date>
    </item>
  </channel>
</rss>

