<?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 incremental load, delete old field and replacing it with new field, same name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/incremental-load-delete-old-field-and-replacing-it-with-new/m-p/418556#M698840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an incremental load running every week, which is just adding data on the bottom of the qvx.&lt;/P&gt;&lt;P&gt;it is my intention to add a flag field, in order to detect which data is the most recent one, so to easily make some selections in the qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I thought of the following:&lt;/P&gt;&lt;P&gt;Loading the new data from the server, adding a field and populating it with 1s&lt;/P&gt;&lt;P&gt;Loading then the "old" data from the qvx, dropping the field (so I get rid of the 1s from the previous week) and ultimately append to this the freshly loaded data from the server (with the 1s)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But "of course" it goes wrong, as when I drop the field with the 1s, it drops also the newly created one from the server...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13603157054492039" jivemacro_uid="_13603157054492039"&gt;&lt;P&gt;Master:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Today() AS DayStamp,&lt;/P&gt;&lt;P&gt;1 as LatestMaster;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM SERVER.GOAM;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM \\folder\Master.qvx (qvx);&lt;/P&gt;&lt;P&gt;DROP FIELD LatestMaster;&lt;/P&gt;&lt;P&gt;STORE Master INTO \\folder\Master.qvx (qvx);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated if you can help me out here; though I an thinking that probably I am going a long way to simply be able to select the values with the latest DayStamp...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2013 09:32:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-08T09:32:24Z</dc:date>
    <item>
      <title>incremental load, delete old field and replacing it with new field, same name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-delete-old-field-and-replacing-it-with-new/m-p/418556#M698840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an incremental load running every week, which is just adding data on the bottom of the qvx.&lt;/P&gt;&lt;P&gt;it is my intention to add a flag field, in order to detect which data is the most recent one, so to easily make some selections in the qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I thought of the following:&lt;/P&gt;&lt;P&gt;Loading the new data from the server, adding a field and populating it with 1s&lt;/P&gt;&lt;P&gt;Loading then the "old" data from the qvx, dropping the field (so I get rid of the 1s from the previous week) and ultimately append to this the freshly loaded data from the server (with the 1s)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But "of course" it goes wrong, as when I drop the field with the 1s, it drops also the newly created one from the server...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13603157054492039" jivemacro_uid="_13603157054492039"&gt;&lt;P&gt;Master:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Today() AS DayStamp,&lt;/P&gt;&lt;P&gt;1 as LatestMaster;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM SERVER.GOAM;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM \\folder\Master.qvx (qvx);&lt;/P&gt;&lt;P&gt;DROP FIELD LatestMaster;&lt;/P&gt;&lt;P&gt;STORE Master INTO \\folder\Master.qvx (qvx);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated if you can help me out here; though I an thinking that probably I am going a long way to simply be able to select the values with the latest DayStamp...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 09:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-delete-old-field-and-replacing-it-with-new/m-p/418556#M698840</guid>
      <dc:creator />
      <dc:date>2013-02-08T09:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: incremental load, delete old field and replacing it with new field, same name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-delete-old-field-and-replacing-it-with-new/m-p/418557#M698841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i think you are basically there all you need to do is not try and store all of the fields into your qvx, lets say you have columns named col1 and col2 in your GOAM table, try the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;Master:&lt;BR /&gt;LOAD&lt;BR /&gt;col1,col2,&lt;BR /&gt;Today() AS DayStamp,&lt;BR /&gt;1 as LatestMaster;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM SERVER.GOAM;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;concatenate (Master)&lt;BR /&gt;LOAD col1,col2&lt;BR /&gt;FROM \\folder\Master.qvx (qvx);&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;STORE col1,col2 from Master INTO \\folder\Master.qvx (qvx);&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 15:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-delete-old-field-and-replacing-it-with-new/m-p/418557#M698841</guid>
      <dc:creator>sbaldwin</dc:creator>
      <dc:date>2013-02-08T15:05:47Z</dc:date>
    </item>
  </channel>
</rss>

