<?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 optimize a load qvd statement with Where field &amp;lt; value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908637#M315513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Massimo, this was really helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 15:36:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-04T15:36:20Z</dc:date>
    <item>
      <title>How to optimize a load qvd statement with Where field &lt; value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908635#M315511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm looking for ways to optimize the following load statement, and everything I have seen is that you can only use WHERE statements if it is WHERE EXISTS.&amp;nbsp; Currently we only want to load the past 24 months of data, so we have created a cutoff variable, which is then referenced in our where clause on the load statement.&amp;nbsp; The QVD that we are working with is 26 gigs and currently to run the current load statement takes 1.5 hrs.&amp;nbsp; I'm looking for ways to speed this up, but haven't been able to wrap my brain around how I would change the date from WHERE &amp;lt; value to WHERE exists.&amp;nbsp; Here is the load statement and just looking to see if anyone had any suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeremy Kofoot&lt;/P&gt;&lt;P&gt;Let vToday&amp;nbsp; = today();&lt;BR /&gt;Let cutoff = vToday - 729;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EBILL:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;LOAD [Tracking Number EBill],&lt;BR /&gt; TNumYear as TrackNumKey,&lt;BR /&gt; [Charge Description Code txt],&lt;BR /&gt; [Account Number],&lt;BR /&gt; [Invoice Date],&lt;BR /&gt; [Invoice Number],&lt;BR /&gt; [Invoice Amount],&lt;BR /&gt; [Transaction Date],&lt;BR /&gt; [Package Quantity],&lt;BR /&gt; [Package Reference Number 2],&lt;BR /&gt; [Package Reference Number 4],&lt;BR /&gt; [Entered Weight],&lt;BR /&gt; [Billed Weight],&lt;BR /&gt; [Package Dimensions],&lt;BR /&gt; Zone,&lt;BR /&gt; [Charge Category Code],&lt;BR /&gt; [Charge Category Detail Code],&lt;BR /&gt; [Charge Source],&lt;BR /&gt; [Type Code 1],&lt;BR /&gt; [Type Detail Code 1],&lt;BR /&gt; [Charge Classification Code],&lt;BR /&gt; [Charge Description Code],&lt;BR /&gt; [Charge Description],&lt;BR /&gt; [Net Amount],&lt;BR /&gt; [Sender Name],&lt;BR /&gt; [Sender Company Name],&lt;BR /&gt; [Sender Address Line 1],&lt;BR /&gt; [Sender Address Line 2],&lt;BR /&gt; [Sender City],&lt;BR /&gt; [Sender State],&lt;BR /&gt; [Sender Postal],&lt;BR /&gt; [Sender Country],&lt;BR /&gt; [Receiver Name],&lt;BR /&gt; [Receiver Company Name],&lt;BR /&gt; [Receiver Address Line 1],&lt;BR /&gt; [Receiver Address Line 2],&lt;BR /&gt; [Receiver City],&lt;BR /&gt; [Receiver State],&lt;BR /&gt; [Receiver Postal],&lt;BR /&gt; [Receiver Country],&lt;BR /&gt; [Third Party Name],&lt;BR /&gt; [Third Party Company Name],&lt;BR /&gt; [Third Party Address Line 1],&lt;BR /&gt; [Third Party Address Line 2],&lt;BR /&gt; [Third Party City],&lt;BR /&gt; [Third Party State],&lt;BR /&gt; [Third Party Postal],&lt;BR /&gt; [Third Party Country],&lt;BR /&gt; [Miscellaneous Line 1],&lt;BR /&gt; [Miscellaneous Line 2],&lt;BR /&gt; [UPS Shipment Quantity],&lt;BR /&gt; [UPS Accessorial Charges Billed],&lt;BR /&gt; [UPS Freight Cost Billed],&lt;BR /&gt; [UPS Fuel Surcharge Billed]&lt;BR /&gt;FROM &lt;A href="https://community.qlik.com/"&gt;\\...\shipping.qvd&lt;/A&gt; (qvd)&lt;BR /&gt;WHERE [Transaction Date] &amp;gt; $(cutoff);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 18:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908635#M315511</guid>
      <dc:creator />
      <dc:date>2015-08-03T18:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize a load qvd statement with Where field &lt; value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908636#M315512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try with something like this for an optimized load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// make a temp table with the date you want to load &lt;/P&gt;&lt;P&gt;tmp:&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&amp;nbsp; date(today() - 729 + rowno()) as [Transaction Date]&lt;/P&gt;&lt;P&gt;AutoGenerate 729;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// load with exists (optimized)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;FROM \\...\shipping.qvd (qvd)&lt;/P&gt;&lt;P&gt;WHERE exists([Transaction Date]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table tmp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 19:17:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908636#M315512</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-03T19:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize a load qvd statement with Where field &lt; value</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908637#M315513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Massimo, this was really helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 15:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-optimize-a-load-qvd-statement-with-Where-field-lt-value/m-p/908637#M315513</guid>
      <dc:creator />
      <dc:date>2015-08-04T15:36:20Z</dc:date>
    </item>
  </channel>
</rss>

