<?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: Conditional load based on an incremental load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899140#M658818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try this:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transactions:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;trans_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;trans_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; as LookUp_&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;trans_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operator,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_type&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;concatenate Transactions&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD trans_act,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; event,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soldon,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(qvd)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where not exists (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;STRONG&gt;LookUp_&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;trans_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;,&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;trans_ID)&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;DROP FIELD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LookUp_&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;trans_ID&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 May 2015 17:32:38 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-05-08T17:32:38Z</dc:date>
    <item>
      <title>Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899135#M658812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm tying to load 2 tables (TRANS, ADVM) from a Visual FoxPro db, it needs to be refreshed hourly. Since both tables hold a lot of transactions and it is our production database I tried an hourly incremental load on each of the tables and storing them into a qvd and using the qvd for the application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_ID,&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time, &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operator, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_type&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P&gt;ADVM:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; event, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soldon, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;One table has date and time, but the other one has only the date, so I tried filtering by trans_ID, using a variable to hold the last known trans_ID, it was working well, but apparently the id numbers don't go in a chronological order and I was loosing a few transactions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So I need a different way of getting the information. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm testing on the qvd's now, I tried doing a join and filtering by date and time on table TRANS, but that loads all 4 mil records from ADVM. Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transactions:&lt;/P&gt;&lt;P&gt;LOAD &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;trans_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operator, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_type&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;where date(date)&amp;gt;='5/7/2015' and time&amp;gt;'6:00:00';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join(Transactions)&lt;/P&gt;&lt;P&gt;LOAD trans_act,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; event, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soldon, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 16:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899135#M658812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-07T16:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899136#M658813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want to do incremental load you should be using concatenate instead of left join, if you have a transid and this is unique for each transaction you can use where not exists &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transactions:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;trans_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operator,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_type&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;concatenate Transactions&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD trans_act,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; event,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soldon,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(qvd)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where not exists (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;trans_ID,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;trans_ID)&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;here is more info on incremental loads with QVDs&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;H1&gt;&lt;A name="kanchor965"&gt;&lt;/A&gt;Using QVD Files for &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Incremental&lt;/SPAN&gt; Load&lt;/H1&gt;&lt;P&gt;&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Incremental&lt;/SPAN&gt; load is a very common task in relation to data bases. It is defined as loading nothing but new or changed records from the database. All other data should already be available, in one way or another. With &lt;A class="MCXref_0"&gt;&lt;EM&gt;QVD Files&lt;/EM&gt;&lt;/A&gt; it is possible to perform &lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;incremental&lt;/SPAN&gt; load in most cases. &lt;/P&gt;&lt;P&gt;The basic process is described below:&lt;/P&gt;&lt;P&gt;1. Load the &lt;SPAN style="color: #ffffff; background-color: #ff0000;"&gt;new data&lt;/SPAN&gt; from Database table (a slow process, but loading a limited number of records). &lt;/P&gt;&lt;P&gt;2. Load the &lt;SPAN style="background-color: #008080;"&gt;old data&lt;/SPAN&gt; from QVD file (loading many records, but a much faster process). &lt;/P&gt;&lt;P&gt;3. Create a new QVD file. &lt;/P&gt;&lt;P&gt;4. Repeat the procedure for every table loaded. &lt;/P&gt;&lt;P&gt;&lt;IMG border="0" class="jive-image" style="border-style: none;" /&gt; &lt;/P&gt;&lt;P&gt;The complexity of the actual solution depends on the nature of the source database, but the following basic cases can be identified:&lt;/P&gt;&lt;P&gt;1) &lt;A class="MCXref_0" href="https://community.qlik.com/"&gt;&lt;EM&gt;Case 1: Append Only&lt;/EM&gt;&lt;/A&gt; (typically log files &lt;/P&gt;&lt;P&gt;2) &lt;A class="MCXref_0" href="https://community.qlik.com/"&gt;&lt;EM&gt;Case 2: Insert Only (No Update or Delete)&lt;/EM&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;3) &lt;A class="MCXref_0" href="https://community.qlik.com/"&gt;&lt;EM&gt;Case 3: Insert and Update (No Delete)&lt;/EM&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;4) &lt;A class="MCXref_0" href="https://community.qlik.com/"&gt;&lt;EM&gt;Case 4: Insert, Update and Delete&lt;/EM&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Below you will find outlined solutions for each of these cases. The reading of QVD files can be done in either optimized mode or standard mode. (The method employed is automatically selected by the QlikView script engine depending on the complexity of the operation.) Optimized mode is (very approximately) about 10x faster than standard mode or about 100x faster than loading the database in the ordinary fashion. &lt;/P&gt;&lt;H3&gt;&lt;A name="kanchor966"&gt;&lt;/A&gt;&lt;A name="Append_only"&gt;&lt;/A&gt;Case 1: Append Only&lt;/H3&gt;&lt;P&gt;The simplest case is the one of log files; files in which records are only appended and never deleted. The following conditions apply:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; The database must be a log file (or some other file in which records are appended and not inserted or deleted) which is contained in a text file (no ODBC/OLE DB).&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; QlikView keeps track of the number of records that have been previously read and loads only records added at the end of the file. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG border="0" class="jive-image" style="border-style: none;" /&gt; &lt;/P&gt;&lt;P class="example"&gt;Script Example:&lt;/P&gt;&lt;P class="Code"&gt;Buffer (&lt;SPAN style="color: #ffffff; background-color: #3399ff;"&gt;Incremental&lt;/SPAN&gt;) Load * From LogFile.txt (ansi, txt, delimiter is '\t', embedded labels);&lt;/P&gt;&lt;H3&gt;&lt;A name="kanchor967"&gt;&lt;/A&gt;&lt;A name="Insert_only"&gt;&lt;/A&gt;Case 2: Insert Only (No Update or Delete)&lt;/H3&gt;&lt;P&gt;If the data resides in a database other than a simple log file the case 1 approach will not work. However, the problem can still be solved with minimum amount of extra work. The following conditions apply:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; The data source can be any database.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; QlikView loads records inserted in the database after the last script execution.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; A field ModificationDate (or similar) is required for QlikView to recognize which records are new. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG border="0" class="jive-image" style="border-style: none;" /&gt; &lt;/P&gt;&lt;P class="example"&gt;Script Example:&lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="font-style: italic;"&gt;QV_Table&lt;/SPAN&gt;:&lt;/P&gt;&lt;P class="Code"&gt;SQL SELECT PrimaryKey, X, Y FROM DB_TABLE&lt;/P&gt;&lt;P class="Code"&gt;WHERE ModificationTime &amp;gt;= #$(LastExecTime)#&lt;/P&gt;&lt;P class="Code"&gt;AND ModificationTime &amp;lt; #$(BeginningThisExecTime)#;&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Concatenate LOAD PrimaryKey, X, Y FROM File.QVD;&lt;/P&gt;&lt;P class="Code"&gt;STORE QV_Table INTO File.QVD;&lt;/P&gt;&lt;P&gt;(The hash signs in the SQL WHERE clause define the beginning and end of a date. Check your database manual for the correct date syntax for your database.)&lt;/P&gt;&lt;H3&gt;&lt;A name="kanchor968"&gt;&lt;/A&gt;&lt;A name="Insert_and_Update"&gt;&lt;/A&gt;Case 3: Insert and Update (No Delete)&lt;/H3&gt;&lt;P&gt;The next case is applicable when data in previously loaded records may have changed between script executions. The following conditions apply:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; The data source can be any database.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; QlikView loads records inserted into the database or updated in the database after the last script execution &lt;/LI&gt;&lt;LI&gt; A field ModificationDate (or similar) is required for QlikView to recognize which records are new.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; A primary key field is required for QlikView to sort out updated records from the QVD file.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; This solution will force the reading of the QVD file to standard mode (rather than optimized), which is still considerably faster than loading the entire database. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG border="0" class="jive-image" style="border-style: none;" /&gt; &lt;/P&gt;&lt;P class="example"&gt;Script Example:&lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="font-style: italic;"&gt;QV_Table&lt;/SPAN&gt;:&lt;/P&gt;&lt;P class="Code"&gt;SQL SELECT PrimaryKey, X, Y FROM DB_TABLE&lt;/P&gt;&lt;P class="Code"&gt;WHERE ModificationTime &amp;gt;= #$(LastExecTime)#;&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Concatenate LOAD PrimaryKey, X, Y FROM File.QVD&lt;/P&gt;&lt;P class="Code"&gt;WHERE NOT Exists(PrimaryKey);&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;STORE QV_Table INTO File.QVD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3&gt;&lt;A name="kanchor969"&gt;&lt;/A&gt;&lt;A name="Insert__Update_and_Delete"&gt;&lt;/A&gt;Case 4: Insert, Update and Delete&lt;/H3&gt;&lt;P&gt;The most difficult case to handle is when records are actually deleted from the source database between script executions. The following conditions apply: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; The data source can be any database.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; QlikView loads records inserted into the database or updated in the database after the last script execution.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; QlikView removes records deleted from the database after the last script execution.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; A field ModificationDate (or similar) is required for QlikView to recognize which records are new.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; A primary key field is required for QlikView to sort out updated records from the QVD file.&amp;nbsp; &lt;/LI&gt;&lt;LI&gt; This solution will force the reading of the QVD file to standard mode (rather than optimized), which is still considerably faster than loading the entire database. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG border="0" class="jive-image" style="border-style: none;" /&gt; &lt;/P&gt;&lt;P class="example"&gt;Script Example:&lt;/P&gt;&lt;P class="Code"&gt;Let ThisExecTime = Now( ); &lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="font-style: italic;"&gt;QV_Table&lt;/SPAN&gt;:&lt;/P&gt;&lt;P class="Code"&gt;SQL SELECT PrimaryKey, X, Y FROM DB_TABLE&lt;/P&gt;&lt;P class="Code"&gt;WHERE ModificationTime &amp;gt;= #$(LastExecTime)#&lt;/P&gt;&lt;P class="Code"&gt;AND ModificationTime &amp;lt; #$(ThisExecTime)#;&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Concatenate LOAD PrimaryKey, X, Y FROM File.QVD&lt;/P&gt;&lt;P class="Code"&gt;WHERE NOT EXISTS(PrimaryKey);&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Inner Join SQL SELECT PrimaryKey FROM DB_TABLE;&lt;/P&gt;&lt;P class="Code"&gt;&lt;/P&gt;&lt;P class="Code"&gt;If ScriptErrorCount = 0 then &lt;/P&gt;&lt;P class="Code"&gt;STORE QV_Table INTO File.QVD;&lt;/P&gt;&lt;P class="Code"&gt;Let LastExecTime = ThisExecTime; &lt;/P&gt;&lt;P class="Code"&gt;End If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 17:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899136#M658813</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-07T17:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899137#M658814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="Code"&gt;That is a very good answer, I tried it but it's not working because the field trans_ID is not unique in table ADVM, so when I load it with the clause 'where not exists' it only loads one record when there will be more. Do you have any other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 17:15:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899137#M658814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-08T17:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899138#M658815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you have a way to create a unique key ? &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;maybe by combining a key with another value ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 17:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899138#M658815</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-08T17:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899139#M658817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if not then you might be able to insert the values based on last updated date &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 17:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899139#M658817</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-05-08T17:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899140#M658818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try this:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Transactions:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;trans_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;trans_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; as LookUp_&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;trans_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; operator,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_type&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;concatenate Transactions&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD trans_act,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; event,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soldon,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trans_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(qvd)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where not exists (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;STRONG&gt;LookUp_&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;trans_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;,&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;trans_ID)&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;DROP FIELD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LookUp_&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;trans_ID&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 17:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899140#M658818</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-08T17:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load based on an incremental load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899141#M658820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found an other field that I wasn't loading before, that has unique values and I was able to apply your technique on that and it works perfectly! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 15:50:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-based-on-an-incremental-load/m-p/899141#M658820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-11T15:50:33Z</dc:date>
    </item>
  </channel>
</rss>

