<?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: Concatenate Incremental logic for Deleted records in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709544#M255658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load data from the database&lt;/LI&gt;&lt;LI&gt;Store the data into database.qvd&lt;/LI&gt;&lt;LI&gt;Load data from database.qvd&lt;/LI&gt;&lt;LI&gt;Load more data from database.qvd and concatenate it to the table created in step 3.&lt;/LI&gt;&lt;LI&gt;Store the data into database.qvd&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of step 2 is that all the previously stored data in database.qvd is lost. So it never contains more records than what you last retrieved from the database. If records are deleted from the database they won't be stored in the qvd file. What you probably want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load data from the database&lt;/LI&gt;&lt;LI&gt;Load the historical data from database.qvd and concatenate it to table created in step 1.&lt;/LI&gt;&lt;LI&gt;Store the complete set of current (updated) and historical date into database.qvd&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Aug 2014 12:37:54 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-08-20T12:37:54Z</dc:date>
    <item>
      <title>Concatenate Incremental logic for Deleted records</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709543#M255657</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;I'm little bit stuck with a tricky Incremental logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data i'm getting from the DB&amp;nbsp; reside in the Table for Just one month or near to that.&lt;/P&gt;&lt;P&gt;After which the history records gets deleted from the Table permanently.&lt;/P&gt;&lt;P&gt;i want to append these records and concatenate with the latest records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the samle code i used with sample data.&lt;/P&gt;&lt;P&gt;I'm able to achieve the incremental portion that means the updated records are getting concatenated to the existing one.&lt;/P&gt;&lt;P&gt;But once some records are deleted from the table, i'm missing them in my qvd too.&lt;/P&gt;&lt;P&gt;Initial:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database:&lt;/P&gt;&lt;P&gt;LOAD &lt;STRONG&gt;RP_LT_NUM&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RECEIVE_DATE&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RELEASE_DATE&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;WP_LT_NUM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\ sample.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [DATABSE]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Outer join(Database):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;STRONG&gt;INDUSTRY &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;MEASURE_DATE&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;WP_LT_NUM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\WPLT_FIRST.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [WPLT]);&lt;/P&gt;&lt;P&gt;STORE Database into Database.QVD(qvd);&lt;/P&gt;&lt;P&gt;DROP Table Database;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Max(&lt;STRONG&gt;RECEIVE_DATE&lt;/STRONG&gt;) as Max_DT&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;..:\Database.QVD&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vMax_DT=Date(Peek('Max_DT',-1,'Max'),'M/D/YYYY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incremental:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RP_LT_NUM&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RECEIVE_DATE&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RELEASE_DATE&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;WP_LT_NUM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INDUSTRY ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;MEASURE_DATE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;..:\Database.qvd&lt;/P&gt;&lt;P&gt;(qvd) Where &lt;STRONG&gt;RECEIVE_DATE&lt;/STRONG&gt;&amp;gt;= $(vMax_DT);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;LOAD &lt;STRONG&gt;RP_LT_NUM&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;WP_LT_NUM&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RECEIVE_DATE&lt;/STRONG&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RELEASE_DATE&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INDUSTRY ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;MEASURE_DATE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;..:\Database.qvd&lt;/P&gt;&lt;P&gt;(qvd) Where not Exists(&lt;STRONG&gt;RECEIVE_DATE&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;STORE Incremental into Database.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 20:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709543#M255657</guid>
      <dc:creator />
      <dc:date>2014-08-19T20:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate Incremental logic for Deleted records</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709544#M255658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load data from the database&lt;/LI&gt;&lt;LI&gt;Store the data into database.qvd&lt;/LI&gt;&lt;LI&gt;Load data from database.qvd&lt;/LI&gt;&lt;LI&gt;Load more data from database.qvd and concatenate it to the table created in step 3.&lt;/LI&gt;&lt;LI&gt;Store the data into database.qvd&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of step 2 is that all the previously stored data in database.qvd is lost. So it never contains more records than what you last retrieved from the database. If records are deleted from the database they won't be stored in the qvd file. What you probably want is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Load data from the database&lt;/LI&gt;&lt;LI&gt;Load the historical data from database.qvd and concatenate it to table created in step 1.&lt;/LI&gt;&lt;LI&gt;Store the complete set of current (updated) and historical date into database.qvd&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2014 12:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709544#M255658</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-08-20T12:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate Incremental logic for Deleted records</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709545#M255659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks all..I got it. My bad..I did a silly mistake. &lt;/P&gt;&lt;P&gt;instead of appending to the the initial QVD, I was doing the alternate one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 15:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenate-Incremental-logic-for-Deleted-records/m-p/709545#M255659</guid>
      <dc:creator />
      <dc:date>2014-09-01T15:06:43Z</dc:date>
    </item>
  </channel>
</rss>

