<?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 Incremental Load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-Load/m-p/361559#M1172574</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, I am struggling to get my head around the incremental load process....&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a number of Excel templates that will be updated monthly (pricing) - these data should be inserted, updated or deleted into my master file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is how I see the load process (but could be mistaken):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14524" alt="File Structure.gif" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/14524_File+Structure.gif" width="450" /&gt;&lt;/P&gt;&lt;P&gt;1) Excel files loaded into a QVW (7 tables loaded from each XL file) - for all new/amended data&lt;/P&gt;&lt;P&gt;2) consolidated new/amended QVW file then creates 1 QVD file for each consolidated table.&lt;/P&gt;&lt;P&gt;3) History is generated by creating 7 QVD tables from the previous consolidated file&lt;/P&gt;&lt;P&gt;4) Incremental load process to combine both new and history.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created both a primary key and a modification date (with ModificationTime currently set as "now()" in all QV docs (none created in XL yet).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let ThisExecTime = now();&lt;/P&gt;&lt;P&gt;NewData:&lt;/P&gt;&lt;P&gt;Load * from 2a_HISTORY_Pricing.qvd (qvd);&lt;/P&gt;&lt;P&gt;where ModificationTime &amp;gt;= #$(LastExecTime)#&lt;/P&gt;&lt;P&gt;and ModificationTime &amp;lt; #$(ThisExecTime)#;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;Load * from 1a_NEW_Pricing.qvd (qvd)&lt;/P&gt;&lt;P&gt;where not exists (PrimaryKey);&lt;/P&gt;&lt;P&gt;Inner join load PrimaryKey from 2a_HISTORY_Pricing.qvd (qvd);&lt;/P&gt;&lt;P&gt;if scripterrorcount = 0 then&lt;/P&gt;&lt;P&gt;store NewData into File.QVD;&lt;/P&gt;&lt;P&gt;let LastExecTime = ThisExecTime;&lt;/P&gt;&lt;P&gt;End if&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;Having run my script the following error is being returned, and unsure why, as it is a direct copy from the "incremental load scenarios" document:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14553" alt="Error.gif" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/14553_Error.gif" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone spot the mistake, as I can't... (ie "ModificationTime" exists both in my NEW &amp;amp; HISTORY qvd outputs)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts / suggestions greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&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;STRONG&gt;edit:&lt;/STRONG&gt;&amp;nbsp; vs the script found in the "Incremental Load Scenarios" pdf doc, I amended the above script to remove the "SQL select" statements and changing to "Load *" (as not connecting to a database)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do the "where" statements only belong to the "SQL syntax" and therefore this is my issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 May 2012 13:26:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-21T13:26:06Z</dc:date>
    <item>
      <title>Incremental Load</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load/m-p/361559#M1172574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, I am struggling to get my head around the incremental load process....&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a number of Excel templates that will be updated monthly (pricing) - these data should be inserted, updated or deleted into my master file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is how I see the load process (but could be mistaken):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14524" alt="File Structure.gif" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/14524_File+Structure.gif" width="450" /&gt;&lt;/P&gt;&lt;P&gt;1) Excel files loaded into a QVW (7 tables loaded from each XL file) - for all new/amended data&lt;/P&gt;&lt;P&gt;2) consolidated new/amended QVW file then creates 1 QVD file for each consolidated table.&lt;/P&gt;&lt;P&gt;3) History is generated by creating 7 QVD tables from the previous consolidated file&lt;/P&gt;&lt;P&gt;4) Incremental load process to combine both new and history.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created both a primary key and a modification date (with ModificationTime currently set as "now()" in all QV docs (none created in XL yet).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let ThisExecTime = now();&lt;/P&gt;&lt;P&gt;NewData:&lt;/P&gt;&lt;P&gt;Load * from 2a_HISTORY_Pricing.qvd (qvd);&lt;/P&gt;&lt;P&gt;where ModificationTime &amp;gt;= #$(LastExecTime)#&lt;/P&gt;&lt;P&gt;and ModificationTime &amp;lt; #$(ThisExecTime)#;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;Load * from 1a_NEW_Pricing.qvd (qvd)&lt;/P&gt;&lt;P&gt;where not exists (PrimaryKey);&lt;/P&gt;&lt;P&gt;Inner join load PrimaryKey from 2a_HISTORY_Pricing.qvd (qvd);&lt;/P&gt;&lt;P&gt;if scripterrorcount = 0 then&lt;/P&gt;&lt;P&gt;store NewData into File.QVD;&lt;/P&gt;&lt;P&gt;let LastExecTime = ThisExecTime;&lt;/P&gt;&lt;P&gt;End if&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;Having run my script the following error is being returned, and unsure why, as it is a direct copy from the "incremental load scenarios" document:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14553" alt="Error.gif" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/14553_Error.gif" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone spot the mistake, as I can't... (ie "ModificationTime" exists both in my NEW &amp;amp; HISTORY qvd outputs)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts / suggestions greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&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;STRONG&gt;edit:&lt;/STRONG&gt;&amp;nbsp; vs the script found in the "Incremental Load Scenarios" pdf doc, I amended the above script to remove the "SQL select" statements and changing to "Load *" (as not connecting to a database)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do the "where" statements only belong to the "SQL syntax" and therefore this is my issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2012 13:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load/m-p/361559#M1172574</guid>
      <dc:creator />
      <dc:date>2012-05-21T13:26:06Z</dc:date>
    </item>
    <item>
      <title>Incremental Load</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load/m-p/361560#M1172575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the # hashes in your where clause should be ' single quotes (so I guess it's a typo). Or use numericals like Evan suggested to prevent date format issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why you first load new data from your history price file, but maybe I haven't fully understood you setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe your requirements should be met using the nice incremental load example in the QV cookbook, available on Rob's download page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regads,&lt;/P&gt;&lt;P&gt;Stefam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2012 18:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load/m-p/361560#M1172575</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-21T18:05:39Z</dc:date>
    </item>
  </channel>
</rss>

