<?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 Load only new values from a file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149015#M27226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Spastor.&lt;/P&gt;&lt;P&gt;Unfortunately it seems I have another inner problem: I've tried your solution also before posting here, but now that you confirmed that it should work, it seems that the true problem is anoter. This is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;NewReport:&lt;BR /&gt;LOAD * FROM &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt;NewReport:&lt;BR /&gt;LOAD&lt;BR /&gt;if (@1='04', @2, Peek('utente',-1)) As user,&lt;BR /&gt;if (@1='05', @2) As type,&lt;BR /&gt;if (@1='05', @3, Null()) As class,&lt;BR /&gt;if (@1='05', @4, Null()) As number,&lt;BR /&gt;if (@1='05', Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'), Null()) As date,&lt;BR /&gt;if (@1='05', @6, Null()) As time,&lt;BR /&gt;if (@1='05', @7, Null()) As length&lt;BR /&gt;if (@1='05', @8, Null()) As cost;&lt;BR /&gt;&lt;BR /&gt;LOAD @1,&lt;BR /&gt; @2,&lt;BR /&gt; @3,&lt;BR /&gt; @4,&lt;BR /&gt; @5,&lt;BR /&gt; @6,&lt;BR /&gt; @7,&lt;BR /&gt; @8&lt;BR /&gt;FROM &amp;lt;path&amp;gt;\filetobeimported.dat (ansi, txt, delimiter is '\t', no labels, msq)&lt;BR /&gt;WHERE @1 = '04' OR @1 = '05' AND NOT EXISTS(date);&lt;BR /&gt;STORE NewReport INTO &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It says that "date" doesn't exist, and in fact it is Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'). But to have EXISTS(...) to work I need both variable to have the same name.&lt;/P&gt;&lt;P&gt;Any idea, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jul 2009 20:57:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-10T20:57:37Z</dc:date>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149013#M27224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I have a file I need to load every month (e.g. a log) and this is the procedure I'm aiming to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;load old values stored in a qvd file&lt;/LI&gt;&lt;LI&gt;load the new files from the log&lt;/LI&gt;&lt;LI&gt;save the new table in a qvd file&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Consider that in the log file I'm gonna import there could be rows already loaded in the qvd file, and I don't want duplicates.&lt;/P&gt;&lt;P&gt;Do you know any best practice to do what I'm looking for, please? I've tried with something like this, but with no luck:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;LOAD id FROM &amp;lt;path&amp;gt;\file.qvd (qvd)&lt;BR /&gt;NewValues:&lt;BR /&gt;LOAD @1, @2 ... FROM &amp;lt;path&amp;gt;\log.txt WHERE NOT EXISTS(id)&lt;BR /&gt;CONCATENATE LOAD * FROM &amp;lt;path&amp;gt;\file.qvd (qvd)&lt;BR /&gt;STORE NewValues INTO &amp;lt;path&amp;gt;\file.qvd (qvd)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I always import all the values, or I get error stating that such table doesn't exist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 19:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149013#M27224</guid>
      <dc:creator />
      <dc:date>2009-07-10T19:29:22Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149014#M27225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;First you load you qvd:&lt;/P&gt;&lt;P&gt;Mytable:&lt;/P&gt;&lt;P&gt;load aa,bb from xxx.qvd;&lt;/P&gt;&lt;P&gt;Then you load you new data from your file&lt;/P&gt;&lt;P&gt;Mytable:&lt;/P&gt;&lt;P&gt;Load aa,bb from zzzz.log where not exists(aa); // aa is my key in the example&lt;/P&gt;&lt;P&gt;store MyTable into xxx.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Sébastien&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 19:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149014#M27225</guid>
      <dc:creator />
      <dc:date>2009-07-10T19:34:33Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149015#M27226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Spastor.&lt;/P&gt;&lt;P&gt;Unfortunately it seems I have another inner problem: I've tried your solution also before posting here, but now that you confirmed that it should work, it seems that the true problem is anoter. This is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;NewReport:&lt;BR /&gt;LOAD * FROM &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt;NewReport:&lt;BR /&gt;LOAD&lt;BR /&gt;if (@1='04', @2, Peek('utente',-1)) As user,&lt;BR /&gt;if (@1='05', @2) As type,&lt;BR /&gt;if (@1='05', @3, Null()) As class,&lt;BR /&gt;if (@1='05', @4, Null()) As number,&lt;BR /&gt;if (@1='05', Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'), Null()) As date,&lt;BR /&gt;if (@1='05', @6, Null()) As time,&lt;BR /&gt;if (@1='05', @7, Null()) As length&lt;BR /&gt;if (@1='05', @8, Null()) As cost;&lt;BR /&gt;&lt;BR /&gt;LOAD @1,&lt;BR /&gt; @2,&lt;BR /&gt; @3,&lt;BR /&gt; @4,&lt;BR /&gt; @5,&lt;BR /&gt; @6,&lt;BR /&gt; @7,&lt;BR /&gt; @8&lt;BR /&gt;FROM &amp;lt;path&amp;gt;\filetobeimported.dat (ansi, txt, delimiter is '\t', no labels, msq)&lt;BR /&gt;WHERE @1 = '04' OR @1 = '05' AND NOT EXISTS(date);&lt;BR /&gt;STORE NewReport INTO &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It says that "date" doesn't exist, and in fact it is Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'). But to have EXISTS(...) to work I need both variable to have the same name.&lt;/P&gt;&lt;P&gt;Any idea, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 20:57:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149015#M27226</guid>
      <dc:creator />
      <dc:date>2009-07-10T20:57:37Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149016#M27227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, by the way, I also tried to place the EXISTS clause in the first load, the one with all the IF and where "date" is declared, but with no results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 21:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149016#M27227</guid>
      <dc:creator />
      <dc:date>2009-07-10T21:02:53Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149017#M27228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;think that you should put the WHERE-clause in the preceding LOAD.&lt;/P&gt;&lt;P&gt;Am not sure, how QV handles the logic queries, but would use also some brackets like&lt;/P&gt;&lt;P&gt;WHERE (@1 = '04' OR @1 = '05') AND NOT EXISTS(date).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Jul 2009 03:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149017#M27228</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2009-07-11T03:18:02Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149018#M27229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would need some examples ot be sure that there is no errors in my script but I would do it that way:&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;NewReport:&lt;BR /&gt;LOAD * FROM &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt;NewReport:&lt;BR /&gt;LOAD&lt;BR /&gt;if (@1='04', @2, Peek('utente',-1)) As user,&lt;BR /&gt;if (@1='05', @2) As type,&lt;BR /&gt;if (@1='05', @3, Null()) As class,&lt;BR /&gt;if (@1='05', @4, Null()) As number,&lt;BR /&gt;if (@1='05', Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'), Null()) As [date],&lt;BR /&gt;if (@1='05', @6, Null()) As time,&lt;BR /&gt;if (@1='05', @7, Null()) As length&lt;BR /&gt;if (@1='05', @8, Null()) As cost;&lt;BR /&gt;&lt;BR /&gt;FROM &amp;lt;path&amp;gt;\filetobeimported.dat (ansi, txt, delimiter is '\t', no labels, msq)&lt;BR /&gt;WHERE (@1 = '04' OR @1 = '05') AND NOT EXISTS(Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'),&lt;BR /&gt;[date]);&lt;BR /&gt;STORE NewReport INTO &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt;Your script is telling you that date is not existing because you create the field name when you load your data.&lt;BR /&gt;Hope this helps&lt;BR /&gt;( I don't have QV installed on my computer right now so there coud have some mistakes in my code)&lt;BR /&gt;Rgds&lt;BR /&gt;Sébastien&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 17:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149018#M27229</guid>
      <dc:creator />
      <dc:date>2009-07-14T17:26:45Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149019#M27230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all! I think I should have some spare minutes this afternoon to check your solutions, and then I'll let you know.&lt;/P&gt;&lt;P&gt;Thank you anyway for yout time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 17:31:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149019#M27230</guid>
      <dc:creator />
      <dc:date>2009-07-14T17:31:36Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149020#M27231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to see the qlikview help for loading incremental data using qvd if you have not gone thru it yet. It can be of good assist to you.&lt;/P&gt;&lt;P&gt;-Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 01:45:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149020#M27231</guid>
      <dc:creator>amit_shetty78</dc:creator>
      <dc:date>2009-07-15T01:45:35Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149021#M27232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;The "buffer" solutions seems really nice, but unfortunately it doesn't seem to work in my example. Looks like Qlik can't determine which row has been already loaded.&lt;/P&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;BUFFER (Incremental) LOAD&lt;BR /&gt;if (@1='04', @2, [...];&lt;BR /&gt;LOAD @1, [...]&lt;BR /&gt;FROM &amp;lt;path&amp;gt;\test2.dat (ansi, txt, delimiter is '\t', no labels)&lt;BR /&gt;WHERE (@1 = '04' OR @1 = '05');&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;even loading and storing explicitely the qvd file, but the script keeps loading all the data.&lt;/P&gt;&lt;P&gt;With the classic approach, the one with WHERE EXISTS() clause, I have in mind what it's needed to be done, but I can't implement it in Qlik. The script must read only the rows where "date" is not present, then store it in the qvd file.&lt;/P&gt;&lt;P&gt;I'm really frustrated being not able to solve such a easy task, and I'm sorry to bother you about this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 17:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149021#M27232</guid>
      <dc:creator />
      <dc:date>2009-07-15T17:04:56Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149022#M27233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following code if it works:-&lt;/P&gt;&lt;DIV&gt;LOAD id FROM &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;NewValues:&lt;/DIV&gt;&lt;DIV&gt;noconcatenate&lt;BR /&gt;LOAD @1, @2 ... FROM &amp;lt;path&amp;gt;\log.txt WHERE NOT EXISTS(id);&lt;BR /&gt;CONCATENATE LOAD * FROM &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;BR /&gt;STORE NewValues INTO &amp;lt;path&amp;gt;\file.qvd (qvd);&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks &amp;amp; Best Regards,&lt;/DIV&gt;&lt;DIV&gt;Kuldeep Tak&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 17:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149022#M27233</guid>
      <dc:creator />
      <dc:date>2009-07-15T17:28:42Z</dc:date>
    </item>
    <item>
      <title>Load only new values from a file</title>
      <link>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149023#M27234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally it seems I've found the way out for this problem. All your solutions were mainly correct, but I think that the main issue was related to the way of retrieveing data from the file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LOAD if(...);&lt;BR /&gt;LOAD @1, @2... FROM path/file.log [...]&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now everything seems fixed with a code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;NewReport:&lt;BR /&gt;LOAD * FROM&amp;lt;path&amp;gt;/file.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;if (@1='04', @2, Peek('utente',-1)) As utente,&lt;BR /&gt;if (@1='05', @2) As tipologia,&lt;BR /&gt;if (@1='05', @3, Null()) As classe,&lt;BR /&gt;if (@1='05', @4, Null()) As numero_chiamato,&lt;BR /&gt;if (@1='05', Date(Date#(@5,'YYMMDD'),'DD/MM/YYYY'), Null()) As data,&lt;BR /&gt;if (@1='05', @6, Null()) As ora,&lt;BR /&gt;if (@1='05', @7, Null()) As durata,&lt;BR /&gt;if (@1='05', @8, Null()) As costo;&lt;BR /&gt;&lt;BR /&gt;LOAD @1,&lt;BR /&gt; @2,&lt;BR /&gt; @3,&lt;BR /&gt; @4,&lt;BR /&gt; @5,&lt;BR /&gt; @6,&lt;BR /&gt; @7,&lt;BR /&gt; @8&lt;BR /&gt;FROM &amp;lt;path&amp;gt;\test.dat (ansi, txt, delimiter is '\t', no labels)&lt;BR /&gt;WHERE (@1 = '04' OR @1 = '05');&lt;BR /&gt;&lt;BR /&gt;LOAD *, utente&amp;amp;data&amp;amp;ora as ID /*** solving string ***/&lt;BR /&gt;RESIDENT NewReport;&lt;BR /&gt;&lt;BR /&gt;STORE NewReport INTO &amp;lt;path&amp;gt;\file.qvd;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I still have to understand why it works even without the NOT EXISTS condition, but actually it does.&lt;/P&gt;&lt;P&gt;Thank you very much for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 22:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-only-new-values-from-a-file/m-p/149023#M27234</guid>
      <dc:creator />
      <dc:date>2009-07-20T22:48:42Z</dc:date>
    </item>
  </channel>
</rss>

