<?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: USE WHERE EXIST() in Water Cooler</title>
    <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705200#M3279</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wwhy do you want to use a the exists function here?are you using s simple where clause to filter on dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 21:02:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-03T21:02:55Z</dc:date>
    <item>
      <title>USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705199#M3278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HOW CAN I USE WHERE EXIST&amp;nbsp; HERE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HPH:&lt;/P&gt;&lt;P&gt;LOAD PHID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHORD, //PurchaseOrd_Id, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHCOMP, // Compañía&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHFAC, // Facility&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHWHSE, // Almacen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHVEND, // Proveedor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHSHTP, // Ship To&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHSHIP, // Ship To #&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHNAME, // Nombre&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHATTN, // Atencion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHENDT, // Fecha Entrada&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHTERM, // Termino de Pago&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHBUYC, // Comprador&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHCUR, // Moneda&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHRQID, // Usuario Requisicion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHLAID, // Usuario Aprobacion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHAPDT, // Fecha Aprobacion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHVTXC, // Codigo de Impuesto&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHCRCC, // Pais&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHCRNO, // RFC BELLOTA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHSRCC, // Pais proveedor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHSRNO, // RFC Proveedor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHCMT; //Fecha de Embarque&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM F60CB75B.MP61BPCSF.HPH&lt;/P&gt;&lt;P&gt;WHERE PHENDT &amp;gt;= '20140901' and&amp;nbsp; PHENDT &amp;lt;= '20140903';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HPO:&lt;/P&gt;&lt;P&gt;LOAD PID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORD ,//as %PurchaseOrd_Id, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PLINE ,//AS&amp;nbsp; PO_Line, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PPROD ,//AS %ProductoId, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PQORD ,//AS ME_PO_Unit, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDDTE ,//AS&amp;nbsp; PO_Date_RQST_DLVR,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PUM ,//AS&amp;nbsp; PO_UM,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PECST,//as [Precio U]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PUMCN,// AS ME_PO_UM_CVTR,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PWHSE ,// AS&amp;nbsp; %Ship_Id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PGEXRT;//&amp;nbsp; AS ME_PO_Tipo_Cambio &lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM F60CB75B.MP61BPCSF.HPO&lt;/P&gt;&lt;P&gt;WHERE PDDTE &amp;gt;= '$(vAño)' and&amp;nbsp; PDDTE &amp;lt;= '$(vHoy)';&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt;-----------------HOW CAN I USE HERE WHERE EXIST??????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:00:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705199#M3278</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705200#M3279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wwhy do you want to use a the exists function here?are you using s simple where clause to filter on dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:02:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705200#M3279</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705201#M3280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying not to use the dates and use only "Exist" in the previous table &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705201#M3280</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705202#M3281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and thanks for comment &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705202#M3281</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705203#M3282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok so in the where statement of the 2nd table you would use the following statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where exists (field in first table,field in second table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this would check against previously loaded values in table 1 &amp;amp; match them to table 2 in those fields specified in the exists function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705203#M3282</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705204#M3283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good info on exists function here &lt;A href="https://community.qlik.com/thread/111999"&gt;Understanding EXISTS() function - Qlikview vs SQL/RDBMS&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:16:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705204#M3283</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705205#M3284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had read that url, but not working for me, I think it's for the SQL connector. I get this error:&lt;IMG alt="Captura.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/65849_Captura.PNG.png" style="width: 620px; height: 116px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705205#M3284</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705206#M3285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is that exits() function syntax is not the same in SQL and qlikview so will cause an error,you can only use it in QV tables.probably the best way to do this in SQL would be as per this syntax&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0); font-family: arial, helvetica, sans-serif;"&gt;USE AdventureWorks2012 ;&lt;BR /&gt;GO&lt;BR /&gt;SELECT a.FirstName, a.LastName&lt;BR /&gt;FROM Person.Person AS a&lt;BR /&gt;WHERE EXISTS&lt;BR /&gt;(SELECT * &lt;BR /&gt;&amp;nbsp; FROM HumanResources.Employee AS b&lt;BR /&gt;&amp;nbsp; WHERE a.BusinessEntityID = b.BusinessEntityID&lt;BR /&gt;&amp;nbsp; AND a.LastName = 'Johnson');&lt;BR /&gt;GO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;however would be easier to do in the Qv tables in my opinion&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705206#M3285</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705207#M3286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah i use in QV load, but here i cant use =(&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 22:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705207#M3286</guid>
      <dc:creator />
      <dc:date>2014-09-03T22:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: USE WHERE EXIST()</title>
      <link>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705208#M3287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello baltazar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following will allow you to filter via a WHERE EXISTS on your two load statements.&amp;nbsp; However, I would point out that since the original load statements are SQL from your native RDMS systems, there is probably no processing savings and likely even worse performance from using WHERE EXISTS in this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you remove the filtration condition from the SQL side and shift it to the QlikView side preceding load, the SQL statement is going to pass all values for your filter fields across the Connection, and then only after all the data related to your entire data set in both tables has been brought over to QlikView, only then will the WHERE EXISTS reduce the results based on matching exists values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if HPH and HPO are very large tables, you are much better off for extraction times and resource usage in applying the filter on the native DB syntax.&amp;nbsp; In this scenario here, it doesn't look like WHERE EXISTS will help you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;WHERE EXISTS used under the right conditions will produce an optimized load that is many times faster than ODBC/OLE data transfer rates, but the data must already exist in QVD form before that savings can be realized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine the first time you are reading a very large table and you spend the initial time exporting the whole business to QVD, on the &lt;EM&gt;second &lt;/EM&gt;pass, if there are portions of the data that you extracted to QVD that can be reused, THEN you can capitalize on WHERE EXISTS optimized loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(one caveat... I have used an inefficient Qlikview side WHERE clause in place of an RDMS filter in cases where the WHERE CLAUSE syntax on the SQL statement is not interpreting in a consistent manner.&amp;nbsp; For example, I had a database load that every time the WHERE clause date range on the SQL side was worked out, something would change on the database side and the query would begin returning the entire table, because changing field attributes kept invalidating the filter.&amp;nbsp; Without being able to control the date filtration field on the DB side, taking matters onto the QlikView side allowed sidestepping disruption from the shifting DB attributes.&amp;nbsp; The load times were definitely longer, but the filter never broke from that point forward)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Anyway, here's a version of your script with WHERE EXISTS performing the filtration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;[FILTER_HPH]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;INLINE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[&lt;BR /&gt; PHENDT &lt;BR /&gt; 20140901&lt;BR /&gt; 20140902&lt;BR /&gt; 20140903&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;BR /&gt; HPH:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHORD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//PurchaseOrd_Id, &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHCOMP&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Compañía&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHFAC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Facility&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHWHSE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Almacen&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHVEND&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Proveedor&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHSHTP&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Ship To&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHSHIP&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Ship To #&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHNAME&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Nombre&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHATTN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Atencion&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHENDT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Fecha Entrada&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHTERM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Termino de Pago&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHBUYC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Comprador&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHCUR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Moneda&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHRQID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Usuario Requisicion&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHLAID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Usuario Aprobacion&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHAPDT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Fecha Aprobacion&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHVTXC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Codigo de Impuesto&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHCRCC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Pais&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHCRNO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// RFC BELLOTA&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHSRCC&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// Pais proveedor&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHSRNO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// RFC Proveedor&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PHCMT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//Fecha de Embarque&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue; background: aqua;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue; background: aqua;"&gt;EXISTS&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black; background: aqua;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon; background: aqua;"&gt;PHENDT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black; background: aqua;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon; background: aqua;"&gt;PHENDT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black; background: aqua;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; ; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; SELECT *&lt;BR /&gt; FROM F60CB75B.MP61BPCSF.HPH&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//WHERE PHENDT &amp;gt;= '20140901' and&amp;nbsp; PHENDT &amp;lt;= '20140903'&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;BR /&gt; [FILTER_HPO]:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vAno)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;() - 1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PDDTE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AUTOGENERATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;WHILE&lt;/SPAN&gt; &lt;SPAN style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vAno)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;() - 1&amp;nbsp; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vHoy)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; HPO:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PORD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//as %PurchaseOrd_Id, &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//AS&amp;nbsp; PO_Line, &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PPROD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//AS %ProductoId, &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PQORD&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//AS ME_PO_Unit, &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PDDTE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//AS&amp;nbsp; PO_Date_RQST_DLVR,&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//AS PO_UM,&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PECST&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//as [Precio U]&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PUMCN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// AS ME_PO_UM_CVTR,&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PWHSE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// AS&amp;nbsp; %Ship_Id,&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;PGEXRT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;// AS ME_PO_Tipo_Cambio&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue; background: aqua;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue; background: aqua;"&gt;EXISTS&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black; background: aqua;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon; background: aqua;"&gt;PDDTE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black; background: aqua;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon; background: aqua;"&gt;PDDTE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black; background: aqua;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; ; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; SELECT *&lt;BR /&gt; FROM F60CB75B.MP61BPCSF.HPO&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//WHERE PDDTE &amp;gt;= '$(vAño)' and&amp;nbsp; PDDTE &amp;lt;= '$(vHoy)'&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//&amp;lt;&amp;lt;&amp;lt;&amp;lt;-----------------HOW CAN I USE HERE WHERE EXIST??????&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;TABLES&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; [FILTER_HPH], [FILTER_HP0]; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 04:30:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Water-Cooler/USE-WHERE-EXIST/m-p/705208#M3287</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2014-09-04T04:30:43Z</dc:date>
    </item>
  </channel>
</rss>

