<?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: Appending data without duplicates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011332#M1221771</link>
    <description>&lt;P&gt;Assuming that your different fieldnames is just a typo the used incremental approach is structural and syntactically ok. But the values of the identifier- respectively the exists-fields must be logically suitable - which isn't the case if the dates of the current-load and the historical data could be overlapping. If at least one source has a date-completed dataset you could use date as exists-field whereby depending on the data you may need to switch the load-order and loading at first the historical ones and adding then the current ones.&lt;/P&gt;
&lt;P&gt;Better as the dates would be if you could use an unique record-identifier. This is usually a field like your ID and if the ID alone isn't unique you may add some further fields to make it unique, for example by a field like an OrderID you may add the row-position (if not already such OrderLineID exists).&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2022 09:16:04 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2022-12-01T09:16:04Z</dc:date>
    <item>
      <title>Appending data without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011151#M1221766</link>
      <description>&lt;P&gt;I have a table saved down in qvd format and I concatenate that data with a table loaded from excel sheet&lt;/P&gt;
&lt;P&gt;Issue:&lt;/P&gt;
&lt;P&gt;Where not exists logic is not working.&lt;/P&gt;
&lt;P&gt;Without that everytime you run the code; the no of records gets doubled up.&lt;/P&gt;
&lt;P&gt;The second table  attributes has table name appended to it where as first table do not&lt;/P&gt;
&lt;P&gt;How do I concatenate two tables and if the data for that data already exists then we do not concatenate for that particular date&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;       LOAD&lt;/P&gt;
&lt;P&gt;           [ID],&lt;/P&gt;
&lt;P&gt;           [Geo Area] as [Table1.Geo Area],&lt;/P&gt;
&lt;P&gt;           [Status] as [Table1.Status],          &lt;/P&gt;
&lt;P&gt;           [Date] as [Table1.Date]&lt;/P&gt;
&lt;P&gt;      FROM ['$(folder_path)'/*.xlsx]&lt;/P&gt;
&lt;P&gt;      (ooxml, embedded labels, table is Sheet1])&lt;/P&gt;
&lt;P&gt;     ;&lt;/P&gt;
&lt;P&gt;     &lt;/P&gt;
&lt;P&gt;       Concatenate Table2:&lt;/P&gt;
&lt;P&gt;       LOAD&lt;/P&gt;
&lt;P&gt;           [ID],&lt;/P&gt;
&lt;P&gt;           [Table1.Geo Area],&lt;/P&gt;
&lt;P&gt;           [Tabble1.Status],&lt;/P&gt;
&lt;P&gt;           [Tabble1.Date]&lt;/P&gt;
&lt;P&gt;       from&lt;/P&gt;
&lt;P&gt;       '$(folder_path)'/Table1.qvd(qvd)&lt;/P&gt;
&lt;P&gt;        where (not Exists([Table1.Date]));&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 20:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011151#M1221766</guid>
      <dc:creator>Ashti</dc:creator>
      <dc:date>2022-11-30T20:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Appending data without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011202#M1221767</link>
      <description>&lt;P&gt;You have different field names in the two tables [Table1.Date] and [Tabble1.Date]. You need to use the two parameter version of the exists() function.&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Code:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Table2:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[ID],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Geo Area] as [Table1.Geo Area],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Status] as [Table1.Status],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Date] as [Table1.Date]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM ['$(folder_path)'/*.xlsx]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(ooxml, embedded labels, table is Sheet1])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Concatenate Table2:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[ID],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Table1.Geo Area],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Tabble1.Status],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[Tabble1.Date]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;from&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;'$(folder_path)'/Table1.qvd(qvd)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;where &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt; not Exists([Table1.Date]&lt;FONT color="#800000"&gt;&lt;STRONG&gt;,[Tabble1.Date]&lt;/STRONG&gt;&lt;/FONT&gt;);&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 22:46:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011202#M1221767</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2022-11-30T22:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Appending data without duplicates</title>
      <link>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011332#M1221771</link>
      <description>&lt;P&gt;Assuming that your different fieldnames is just a typo the used incremental approach is structural and syntactically ok. But the values of the identifier- respectively the exists-fields must be logically suitable - which isn't the case if the dates of the current-load and the historical data could be overlapping. If at least one source has a date-completed dataset you could use date as exists-field whereby depending on the data you may need to switch the load-order and loading at first the historical ones and adding then the current ones.&lt;/P&gt;
&lt;P&gt;Better as the dates would be if you could use an unique record-identifier. This is usually a field like your ID and if the ID alone isn't unique you may add some further fields to make it unique, for example by a field like an OrderID you may add the row-position (if not already such OrderLineID exists).&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 09:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Appending-data-without-duplicates/m-p/2011332#M1221771</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-12-01T09:16:04Z</dc:date>
    </item>
  </channel>
</rss>

