<?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 Help with Incremental Reload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152755#M1332301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have implemented your code it is working fine my side.&lt;/P&gt;&lt;P&gt;thanks to you.&lt;/P&gt;&lt;P&gt;can you put some light on -&lt;/P&gt;&lt;P&gt;what is the purpose of this -&lt;/P&gt;&lt;P&gt;&lt;B&gt;Directory&lt;/B&gt; QVD/;&lt;/P&gt;&lt;P&gt;is it required?&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jan 2011 08:10:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-12T08:10:12Z</dc:date>
    <item>
      <title>Help with Incremental Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152750#M1332294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We've got a table of about 23.5 million rows which represent 18 months (rolling) of data. There are about 80k new or updated rows every day. Using Rob Wunderlich's example, I have created the following script. But it runs really slow and in the end it fails to update the QVD. I'd appreciate it if someone could take a quick look and let me know if anything looks wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;SCRIPT_START&lt;/B&gt;=now(1)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;PKexp&lt;/B&gt;=autonumberhash128(&lt;B&gt;Branch_Plant&lt;/B&gt;,&lt;B&gt;SKU&lt;/B&gt;,&lt;B&gt;Lot_Code&lt;/B&gt;,&lt;B&gt;Location&lt;/B&gt;,&lt;B&gt;Transaction_Date&lt;/B&gt;,&lt;B&gt;Transaction_Time&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;IF&lt;/B&gt; filesize('QVD/Detail_Inventory_Transactions_Last2_FY.qvd') &amp;gt; 0 &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SET&lt;/B&gt; &lt;B&gt;QVD_EXISTS&lt;/B&gt;=1&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;QVD_ROWS_BEFORE&lt;/B&gt;=QvdNoOfRecords('QVD/Detail_Inventory_Transactions_Last2_FY.qvd')&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;ELSE&lt;/P&gt;&lt;P&gt;&lt;B&gt;SET&lt;/B&gt; &lt;B&gt;QVD_EXISTS&lt;/B&gt;=1&lt;B&gt;;&lt;/B&gt; // Always make True becasue this part isn't working for some reason.&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;QVD_ROWS_BEFORE&lt;/B&gt;=QvdNoOfRecords('QVD/Detail_Inventory_Transactions_Last2_FY.qvd')&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;IF&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(QVD_EXISTS)&lt;/I&gt;&lt;/B&gt; &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;GetLastDateTemp:&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; &lt;B&gt;Record_Update_Date&lt;/B&gt; &lt;B&gt;FROM&lt;/B&gt; &lt;B&gt;QVD&lt;/B&gt;/&lt;B&gt;Detail_Inventory_Transactions_Last2_FY.qvd&lt;/B&gt; (&lt;B&gt;qvd&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; max(&lt;B&gt;Record_Update_Date&lt;/B&gt;) &lt;B&gt;as&lt;/B&gt; &lt;B&gt;MaxLastUpdateDate&lt;/B&gt; &lt;B&gt;RESIDENT&lt;/B&gt; &lt;B&gt;GetLastDateTemp;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;LastUpdateDate&lt;/B&gt; = &lt;B&gt;MaxLastUpdateDate;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;MaxLastDate&lt;/B&gt; = text(date(fieldValue('MaxLastUpdateDate', 1),'MM/DD/YY hh:mm tt'))&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;DROP&lt;/B&gt; &lt;B&gt;table&lt;/B&gt; &lt;I&gt;GetLastDateTemp;&lt;/I&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;ELSE&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;MaxLastDate&lt;/B&gt; = '4/1/2009'&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;DIT:&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; Detail_Inventory_Transactions&lt;/P&gt;&lt;P&gt;WHERE "Record_Update_Date" &amp;gt;= &lt;B&gt;&lt;I&gt;'$(MaxLastDate)'&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;B&gt;IF&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(QVD_EXISTS)&lt;/I&gt;&lt;/B&gt; &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;RIGHT&lt;/B&gt; &lt;B&gt;JOIN&lt;/B&gt; (&lt;I&gt;DIT&lt;/I&gt;) &lt;B&gt;LOAD&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;*&lt;/B&gt;,&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;$(PKexp)&lt;/I&gt;&lt;/B&gt; &lt;B&gt;as&lt;/B&gt; &lt;B&gt;PK&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;RESIDENT&lt;/B&gt; &lt;B&gt;DIT;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;CONCATENATE&lt;/B&gt; (DIT) &lt;B&gt;LOAD&lt;/B&gt; &lt;B&gt;*&lt;/B&gt; &lt;B&gt;FROM&lt;/B&gt; &lt;B&gt;QVD&lt;/B&gt;/&lt;B&gt;Detail_Inventory_Transactions_Last2_FY.qvd&lt;/B&gt; (&lt;B&gt;qvd&lt;/B&gt;)&lt;/P&gt;&lt;P&gt;&lt;B&gt;WHERE&lt;/B&gt; &lt;B&gt;NOT&lt;/B&gt; exists(&lt;B&gt;PK&lt;/B&gt;, &lt;B&gt;&lt;I&gt;$(PKexp)&lt;/I&gt;&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;DROP&lt;/B&gt; &lt;I&gt;FIELD&lt;/I&gt; &lt;I&gt;PK;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;STORE&lt;/B&gt; DIT &lt;B&gt;INTO&lt;/B&gt; QVD/Detail_Inventory_Transactions_Last2_FY.qvd;&lt;/P&gt;&lt;P&gt;&lt;B&gt;DROP&lt;/B&gt; &lt;B&gt;TABLE&lt;/B&gt; &lt;I&gt;DIT;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;LOAD_DURATION&lt;/B&gt;=now(1) - &lt;B&gt;SCRIPT_START;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;QVD_ROWS_AFTER&lt;/B&gt;=QvdNoOfRecords('QVD/Detail_Inventory_Transactions_Last2_FY.qvd')&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152750#M1332294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Help with Incremental Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152751#M1332297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot to add:&lt;/P&gt;&lt;P&gt;The primary problem I'm having is that the new QVD being written only contians the new/updated records. It's not merging in the existing records from the QVD. So my file starts at 1.5GB in size but ends up as only 9MB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 04:33:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152751#M1332297</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-21T04:33:52Z</dc:date>
    </item>
    <item>
      <title>Help with Incremental Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152752#M1332298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Briain,&lt;/P&gt;&lt;P&gt;I don't see anything obvious that would explain why you're not merging. Can you tell from the log if the IF block that contains the RIGHT JOIN and the CONCATENATE is being executed?&lt;/P&gt;&lt;P&gt;It would be helpful if you posted the document log. Can you post it here?&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 00:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152752#M1332298</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-05-29T00:08:05Z</dc:date>
    </item>
    <item>
      <title>Help with Incremental Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152753#M1332299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Rob!&lt;/P&gt;&lt;P&gt;I think I've got it working properly now (log contains no errors), but I'm including the revised script if you have a few minutes to look it over. The record delete portion is still commented out - does it look correct to you? It creates a 1.5GB QVD file that contains about 22 million records. It takes about 3 hours to run (25 minutes just to get the Max Date from the QVD).&lt;/P&gt;&lt;P&gt;- Brian&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;// The following script is based on the Incremental Reload script by Rob Wunderlich&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;CONNECT&lt;/B&gt; &lt;B&gt;TO&lt;/B&gt; [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Fg_DataMart;Data Source=occ01db055r;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=BOI03LT073;Use Encryption for Data=False;Tag with column collation when possible=False];&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;Directory&lt;/B&gt; QVD/;&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;SCRIPT_START&lt;/B&gt;=now(1)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;SET&lt;/B&gt; &lt;B&gt;QVDFILE&lt;/B&gt;=&lt;B&gt;Detail_Inventory_Transactions_Last2_FY.qvd;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;SET&lt;/B&gt; &lt;B&gt;PKexp&lt;/B&gt;=autonumberhash128(&lt;B&gt;Branch_Plant&lt;/B&gt;,&lt;B&gt;SKU&lt;/B&gt;,&lt;B&gt;Lot_Code&lt;/B&gt;,&lt;B&gt;Location&lt;/B&gt;,&lt;B&gt;Transaction_Date&lt;/B&gt;,&lt;B&gt;Transaction_Time&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;IF&lt;/B&gt; FileSize(&lt;B&gt;&lt;I&gt;'$(QVDFILE)'&lt;/I&gt;&lt;/B&gt;) &amp;gt; 0 &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; SET &lt;B&gt;QVD_EXISTS&lt;/B&gt;=1&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; Let &lt;B&gt;QVD_ROWS_BEFORE&lt;/B&gt;=QvdNoOfRecords (&lt;B&gt;&lt;I&gt;'$(QVDFILE)'&lt;/I&gt;&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;ELSE&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; SET &lt;B&gt;QVD_EXISTS&lt;/B&gt;=0&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;IF&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(QVD_EXISTS)&lt;/I&gt;&lt;/B&gt; &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LET &lt;B&gt;GETMAXDATE_START&lt;/B&gt;=now(1)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;I&gt;&lt;/I&gt; maxdate:&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LOAD max(&lt;B&gt;Record_Update_Date&lt;/B&gt;) &lt;B&gt;as&lt;/B&gt; &lt;B&gt;maxdate&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; FROM &lt;B&gt;&lt;I&gt;$(QVDFILE)&lt;/I&gt;&lt;/B&gt; (&lt;B&gt;qvd&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LET &lt;B&gt;GETMAXDATE_END&lt;/B&gt;=now(1)-&lt;B&gt;GETMAXDATE_START;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LET &lt;B&gt;vMaxDate&lt;/B&gt; = date(fieldValue('maxdate', 1),'MM/DD/YYYY hh:mm:ss')&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; DROP &lt;B&gt;table&lt;/B&gt; &lt;I&gt;maxdate;&lt;/I&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;IF&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(QVD_EXISTS)&lt;/I&gt;&lt;/B&gt; &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; SET &lt;B&gt;vSQLQuery&lt;/B&gt; = &lt;B&gt;SELECT&lt;/B&gt; &lt;B&gt;*&lt;/B&gt; &lt;B&gt;FROM&lt;/B&gt; &lt;B&gt;Detail_Inventory_Transactions&lt;/B&gt; &lt;B&gt;WHERE&lt;/B&gt; &lt;B&gt;Record_Update_Date&lt;/B&gt; &amp;gt;= &lt;B&gt;&lt;I&gt;'$(vMaxDate)'&lt;/I&gt;&lt;/B&gt;&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold; line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none"&gt;ELSE&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; SET &lt;B&gt;vSQLQuery&lt;/B&gt; = &lt;B&gt;SELECT&lt;/B&gt; &lt;B&gt;*&lt;/B&gt; &lt;B&gt;FROM&lt;/B&gt; &lt;B&gt;Detail_Inventory_Transactions&lt;/B&gt; &lt;B&gt;WHERE&lt;/B&gt; &lt;B&gt;Gl_Date&lt;/B&gt; &amp;gt;= '09/01/2007 00:00:00'&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;GETNEWDATA_START&lt;/B&gt;=now(1)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;I&gt;TempTable:&lt;/I&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(vSQLQuery)&lt;/I&gt;&lt;/B&gt;&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;GETNEWDATA_END&lt;/B&gt;=now(1)-&lt;B&gt;GETNEWDATA_START;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;IF&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(QVD_EXISTS)&lt;/I&gt;&lt;/B&gt; &lt;B&gt;THEN&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LET &lt;B&gt;GETALLDATA_START&lt;/B&gt;=now(1)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; RIGHT &lt;B&gt;JOIN&lt;/B&gt; (&lt;I&gt;TempTable&lt;/I&gt;)&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LOAD&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; *,&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt; $(PKexp)&lt;/B&gt; &lt;B&gt;as&lt;/B&gt; &lt;B&gt;PK&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; RESIDENT &lt;B&gt;TempTable;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; CONCATENATE (TempTable)&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LOAD&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; *&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; FROM &lt;B&gt;&lt;I&gt;$(QVDFILE)&lt;/I&gt;&lt;/B&gt; (&lt;B&gt;qvd&lt;/B&gt;)&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; WHERE &lt;B&gt;NOT&lt;/B&gt; exists(&lt;B&gt;PK&lt;/B&gt;, &lt;B&gt;&lt;I&gt;$(PKexp)&lt;/I&gt;&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; //AND Record_Update_Date &amp;gt;= AddMonths(today(),-24);&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; DROP &lt;I&gt;FIELD&lt;/I&gt; &lt;I&gt;PK;&lt;/I&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt; LET &lt;B&gt;GETALLDATA_END&lt;/B&gt;=now(1)-&lt;B&gt;GETALLDATA_START;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;END&lt;/B&gt; &lt;B&gt;IF&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;STOREDATA_START&lt;/B&gt;=now(1)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;STORE&lt;/B&gt; TempTable &lt;B&gt;INTO&lt;/B&gt; &lt;B&gt;&lt;I&gt;$(QVDFILE)&lt;/I&gt;&lt;/B&gt;;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;STOREDATA_END&lt;/B&gt;=now(1)-&lt;B&gt;STOREDATA_START;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;DROP&lt;/B&gt; &lt;B&gt;TABLE&lt;/B&gt; &lt;I&gt;TempTable;&lt;/I&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;LOAD_DURATION&lt;/B&gt;=now(1) - &lt;B&gt;SCRIPT_START;&lt;/B&gt;&lt;/P&gt;&lt;P style="margin:0in 0in 0pt;line-height:normal;mso-layout-grid-align:none;"&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;LET&lt;/B&gt; &lt;B&gt;QVD_ROWS_AFTER&lt;/B&gt;=QvdNoOfRecords (&lt;B&gt;&lt;I&gt;'$(QVDFILE)'&lt;/I&gt;&lt;/B&gt;)&lt;B&gt;;&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 01:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152753#M1332299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-29T01:39:36Z</dc:date>
    </item>
    <item>
      <title>Help with Incremental Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152754#M1332300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;Glad you got it working as far as getting correct results. On performance, I'll offer a couple suggestions.&lt;/P&gt;&lt;P&gt;- You are probably spending a lot of time generating the PK. Also the PKexp in the WHERE NOT exists() is preventing an optimized load of the QVD. It may be better if you generate the PK only on the new rows and save the PK in the QVD. If you save PK, you can't use autonumber(). You'll have to use something like hash160() which increase the size of your QVD but may be worth the tradeoff. With a saved PK, the WHERE expression is just "WHERE NOT exists(PK)". Exists() with a single expression allows for optimized load.&lt;/P&gt;&lt;P&gt;- If you are only running the update once or a few times a day, you might consider another approach to the maxdate problem. I think sweeping the data to get maxdate is the most accurate technique, but it comes at a performance cost. Perhaps you could use QvdCreateTIme() with a day resolution. That is, select based on date only, don't worry about time. You may duplicate some selects day to day, but the PK will keep them out of the QVD.&lt;/P&gt;&lt;P&gt;- If possible, don't use CONCATENATE in the QVD merge. It's not necessary unless you are adding fields. I've seen cases where CONCATENATE seemed to prevent an optimized load.&lt;/P&gt;&lt;P&gt;- The AddMonths() to roll off older data looks correct, but leave it out for the moment because it will prevent an optimized load. If saving the PKs as suggested gives you an optimized load, it may be better to do the rolloff in a subsequent load against the RESIDENT file.&lt;/P&gt;&lt;P&gt;Good luck. Let us know how it turns out. (I'm taking off for a week but will check when I return).&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 07:20:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152754#M1332300</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-05-30T07:20:25Z</dc:date>
    </item>
    <item>
      <title>Help with Incremental Reload</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152755#M1332301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have implemented your code it is working fine my side.&lt;/P&gt;&lt;P&gt;thanks to you.&lt;/P&gt;&lt;P&gt;can you put some light on -&lt;/P&gt;&lt;P&gt;what is the purpose of this -&lt;/P&gt;&lt;P&gt;&lt;B&gt;Directory&lt;/B&gt; QVD/;&lt;/P&gt;&lt;P&gt;is it required?&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jan 2011 08:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Incremental-Reload/m-p/152755#M1332301</guid>
      <dc:creator />
      <dc:date>2011-01-12T08:10:12Z</dc:date>
    </item>
  </channel>
</rss>

