<?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 &amp; Update in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164255#M915119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks Swuehl.&amp;nbsp; I did have a date with parenthesis around it but failed to write it above.&amp;nbsp; I do have a master calendar but the field name for the 'Date' is different so there is no ambiguity with use of the field names. Since both should work I will try to use the one without the variable because it seems to be a cleaner method.&amp;nbsp; I'll keep on trying based on what you said.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2016 15:53:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-31T15:53:03Z</dc:date>
    <item>
      <title>Concatenate &amp; Update</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164253#M915116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have a script that does not work and I am not sure why.&amp;nbsp; I have an exisiting QVD file with a &lt;STRONG&gt;date &lt;/STRONG&gt;and related data on every row.&amp;nbsp; Every day I update this existing QVD with one new day of data plus updating two prior weeks.&amp;nbsp; I tried two solutions with the same result. It only kept the New/Updated data and wiped the existing. Any advice as to what is going on? Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; What I did :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;1) Load the &lt;STRONG&gt;"&lt;/STRONG&gt;New Data" first which is comprised of the prior two weeks and the prior day (Excel file)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;2) Load (Concatenate) the existing QVD onto the new data where the date doesn't already exist.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;OR&lt;/STRONG&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;2)&amp;nbsp; create variable holding minimum date of new/update data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; color: #000000;"&gt;3) Load (Concatenate) the existing QVD onto the new data where &lt;STRONG&gt;date &lt;/STRONG&gt;is less than the new data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt;SCRIPT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;New Data:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;field1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;field2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;C:\ New&amp;amp;Updated.xlsx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;concatenate LOAD * from C:\Existing.QVD Where not Exists Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OR &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Let vNewMinDate = min(Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;concatenate LOAD * from C:\Existing.QVD Where Date&amp;lt;'$(vNewMinDate)';&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164253#M915116</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate &amp; Update</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164254#M915117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think both approaches should work in principle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in solution 1), I think you need to write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;concatenate LOAD * from C:\Existing.QVD Where not &lt;STRONG&gt;Exists(Date);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and assuming that your Date field shows not your historic dates at that point of time (e.g. that you haven't loaded a kind of master calendar already, or another table with all the dates)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In solution 2) you need to find the Min(Date) using a LOAD statement, then querying the min value using a PEEK() function in your variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MIN:&lt;/P&gt;&lt;P&gt;LOAD Min(Date) as MinDate&lt;/P&gt;&lt;P&gt;RESIDENT [New Data];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vNewMinDate = Peek('MinDate',0,'MIN');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 May 2016 10:26:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164254#M915117</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-28T10:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate &amp; Update</title>
      <link>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164255#M915119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks Swuehl.&amp;nbsp; I did have a date with parenthesis around it but failed to write it above.&amp;nbsp; I do have a master calendar but the field name for the 'Date' is different so there is no ambiguity with use of the field names. Since both should work I will try to use the one without the variable because it seems to be a cleaner method.&amp;nbsp; I'll keep on trying based on what you said.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 15:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Concatenate-Update/m-p/1164255#M915119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-31T15:53:03Z</dc:date>
    </item>
  </channel>
</rss>

