<?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: duplicate records at reload (incremental update and insert) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/duplicate-records-at-reload-incremental-update-and-insert/m-p/1794073#M62183</link>
    <description>&lt;P&gt;Anyone please?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 13:06:36 GMT</pubDate>
    <dc:creator>ioannagr</dc:creator>
    <dc:date>2021-03-24T13:06:36Z</dc:date>
    <item>
      <title>duplicate records at reload (incremental update and insert)</title>
      <link>https://community.qlik.com/t5/App-Development/duplicate-records-at-reload-incremental-update-and-insert/m-p/1793750#M62162</link>
      <description>&lt;P&gt;Hello everyone.&lt;/P&gt;&lt;P&gt;I have done a similar thread before but now i'm more spot on on what i need you to help me with.&lt;/P&gt;&lt;P&gt;I want to achieve Insert and update (no delete) incremental load.&lt;/P&gt;&lt;P&gt;I create the qvd, it's fine, the records are all there. I create the incremental load as always and at the final concatenation I add where not exists (primary key) as advised. When I reload, I see duplicate rows for each id, even if no change has happened to an id. For example let's say i did a change for id=1&amp;nbsp; from yes to no, i get&lt;/P&gt;&lt;P&gt;id state&amp;nbsp; updated&lt;/P&gt;&lt;P&gt;1&amp;nbsp; yes&amp;nbsp; &amp;nbsp; 22/3/2021&lt;/P&gt;&lt;P&gt;1&amp;nbsp; no&amp;nbsp; &amp;nbsp; 23/3/2021&lt;/P&gt;&lt;P&gt;2&amp;nbsp; yes&amp;nbsp; 22/3/2021&lt;/P&gt;&lt;P&gt;2 yes 22/3/2021&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking the problem lies in that my initial qvd has a complex source table, but i do that to avoid joins with very large (100M) lines each time from source.&lt;/P&gt;&lt;P&gt;Have a look at my qvd and incremental script (so and so, as an idea)&lt;/P&gt;&lt;P&gt;&lt;U&gt;inital qvd&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Initial:&lt;/P&gt;&lt;P&gt;Load id, state&lt;/P&gt;&lt;P&gt;sql select from sourcetable1;&lt;/P&gt;&lt;P&gt;STORE Initial&amp;nbsp; INTO '$(vPathQVD)/Initial.qvd';&lt;/P&gt;&lt;P&gt;&lt;U&gt;incremental load&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// have already precalculated last_update and saved it into a variable&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Initial:&lt;/P&gt;&lt;P&gt;//notice there isnt a modification date&lt;STRONG&gt; here&lt;/STRONG&gt; but I get it from another table that they connect with in SQL&lt;/P&gt;&lt;P&gt;//SELECT part&lt;/P&gt;&lt;P&gt;Load id, state&amp;nbsp;&lt;/P&gt;&lt;P&gt;sql select&amp;nbsp; a.id, a.state,b.updated from sourcetable1&amp;nbsp;&lt;/P&gt;&lt;P&gt;inner join sourcetable2&amp;nbsp; b on a.id=b.id where b.updated&amp;gt;='$(Last_Update)'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;Load * from [$(vPathQVD)/Initial.qvd] (qvd)&lt;BR /&gt;WHERE NOT Exists(id);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help! I really need some light on this. On my example table you see updated because as i said the tables normally exist together but to save time i amde them into qvds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 15:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/duplicate-records-at-reload-incremental-update-and-insert/m-p/1793750#M62162</guid>
      <dc:creator>ioannagr</dc:creator>
      <dc:date>2021-03-23T15:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate records at reload (incremental update and insert)</title>
      <link>https://community.qlik.com/t5/App-Development/duplicate-records-at-reload-incremental-update-and-insert/m-p/1794073#M62183</link>
      <description>&lt;P&gt;Anyone please?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 13:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/duplicate-records-at-reload-incremental-update-and-insert/m-p/1794073#M62183</guid>
      <dc:creator>ioannagr</dc:creator>
      <dc:date>2021-03-24T13:06:36Z</dc:date>
    </item>
  </channel>
</rss>

