<?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 with multiple dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142876#M715962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does every row of the txt file have a InvDate? If so, you can approach it this way.&lt;/P&gt;&lt;P&gt;1. LOAD all the data from BillingInfo.txt.&lt;/P&gt;&lt;P&gt;2. LOAD * BillingHistory.qvd (qvd) WHERE NOT exists(InvDate)&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Apr 2009 23:06:18 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2009-04-29T23:06:18Z</dc:date>
    <item>
      <title>Incremental load with multiple dates</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142875#M715961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently doing an incremental load of historical information by loadig a QVD with the prior data, appending the current day's data, then rewriting the QVD. It looks something like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Read the date from the first record of the new file and store it in a variable:&lt;BR /&gt; FindDate:&lt;BR /&gt; LOAD InvDate AS BillingInfoFileDate&lt;BR /&gt; FROM BillingInfo.txt (ansi, txt, delimiter is ';', embedded labels, msq)&lt;BR /&gt; WHERE RecNo()=1;&lt;BR /&gt; LET vBillingInfoFileDate= num(peek('BillingInfoFileDate', 0));&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Load the existing history from the QVD, excluding the date in the new file (I do this to allow for repeated loads throughout the day. It also allows me to correct a previous load of incorrect data):&lt;BR /&gt; BillingHistory:&lt;BR /&gt; LOAD *&lt;BR /&gt; FROM BillingHistory.qvd (qvd)&lt;BR /&gt; WHERE InvDate &amp;lt;&amp;gt; $(vBillingInfoFileDate);&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Add the records from the new file and rewrite the QVD:&lt;BR /&gt;CONCATENATE (BillingHistory)&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM BillingInfo.txt (ansi, txt, delimiter is ';', embedded labels);&lt;BR /&gt;STORE * FROM BillingHistory INTO BillingHistory.qvd;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This method works great right now because I know that the new BillingInfo file will always contain only one date's worth of information. That's about to change because I have to start picking up activity over the weekend and the job that runs Monday morning will cover up to three days. I need a way to read the new file, get all dates included in that file and exclude those dates from the QVD load to prevent loading duplicate records. Individual daily loads on Sat and Sun are not possible.&lt;/P&gt;&lt;P&gt;Thanks in advance for any ideas on how I might approach this.&lt;BR /&gt;Dino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 22:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142875#M715961</guid>
      <dc:creator />
      <dc:date>2009-04-29T22:24:25Z</dc:date>
    </item>
    <item>
      <title>Incremental load with multiple dates</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142876#M715962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does every row of the txt file have a InvDate? If so, you can approach it this way.&lt;/P&gt;&lt;P&gt;1. LOAD all the data from BillingInfo.txt.&lt;/P&gt;&lt;P&gt;2. LOAD * BillingHistory.qvd (qvd) WHERE NOT exists(InvDate)&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 23:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142876#M715962</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-04-29T23:06:18Z</dc:date>
    </item>
    <item>
      <title>Incremental load with multiple dates</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142877#M715963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, every row has among other things, Date and Invoice Number. When I try the method above, I end up losing all invoices from the previous dates except one for each date. I mocked up up some data to test and here's what happened:&lt;/P&gt;&lt;P&gt;First Load File:&lt;BR /&gt;Date,InvNbr&lt;BR /&gt;1/1/2009,110&lt;BR /&gt;1/1/2009,111&lt;BR /&gt;1/1/2009,112&lt;BR /&gt;1/1/2009,113&lt;BR /&gt;1/1/2009,114&lt;BR /&gt;1/1/2009,115&lt;BR /&gt;1/1/2009,116&lt;BR /&gt;1/1/2009,117&lt;BR /&gt;1/1/2009,118&lt;BR /&gt;1/1/2009,119&lt;/P&gt;&lt;P&gt;Loads and writes to QVD as expected (first time around I didn't load the QVD because it didn't exist yet.&lt;/P&gt;&lt;P&gt;The I load the next file:&lt;BR /&gt;Date,InvNbr&lt;BR /&gt;1/2/2009,120&lt;BR /&gt;1/2/2009,121&lt;BR /&gt;1/2/2009,122&lt;BR /&gt;1/2/2009,123&lt;BR /&gt;1/2/2009,124&lt;BR /&gt;1/2/2009,125&lt;BR /&gt;1/2/2009,126&lt;BR /&gt;1/2/2009,127&lt;BR /&gt;1/2/2009,128&lt;BR /&gt;1/2/2009,129&lt;/P&gt;&lt;P&gt;What seems to happen is that the initial file loads as expected. I load the QVD, which doesn't contain1/2/2009 yet, but only the first entry from 1/1/2009 loads and I end up with this:&lt;BR /&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" cellpadding="0" cellspacing="0" style="font-size:9pt;"&gt;&lt;TBODY&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/1/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;121&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;122&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;123&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;124&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;125&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;126&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;127&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;128&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;129&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then I load a file for 1/3/2009 and end up with this:&lt;BR /&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" cellpadding="0" cellspacing="0" style="font-size:9pt;"&gt;&lt;TBODY&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/1/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/2/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;130&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;131&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;132&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;133&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;134&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;135&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;136&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;137&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="#EAEAEA"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;138&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right"&gt;&lt;TD bgcolor="white"&gt;1/3/2009&lt;/TD&gt;&lt;TD bgcolor="white"&gt;139&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;So it seems that the exists() is loading the first invoice of each date from the qvd, then rejecting subsequent records with the same date but different invoice numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 00:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142877#M715963</guid>
      <dc:creator />
      <dc:date>2009-04-30T00:35:46Z</dc:date>
    </item>
    <item>
      <title>Incremental load with multiple dates</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142878#M715964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for my incomplete answer. What you need to do is define a combination of fields that represent a Key and use that in the exists.&lt;/P&gt;&lt;P&gt;Date &amp;amp; '|' &amp;amp; InvNbr as PK&lt;/P&gt;&lt;P&gt;and then&lt;/P&gt;&lt;P&gt;WHERE NOT exists(PK)&lt;/P&gt;&lt;P&gt;If you have large keys, you can reduce the size by using authonumberhash128() -- but then you have to repeat the hash in the QVD concatenate. For a complete Incremental Reload example, including the autonumberhash128 technique, see the QV Cookbook sample "Incremental reload template and example".&lt;/P&gt;&lt;P&gt;You can get the QV Cookbook from:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.robwunderlich.com/Download.html"&gt;http://www.robwunderlich.com/Download.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 00:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142878#M715964</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-04-30T00:53:03Z</dc:date>
    </item>
    <item>
      <title>Incremental load with multiple dates</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142879#M715965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that seems to do it. My challenges are then to find the right combination of fields to use as the key and to stop users from changing history on me, neither of which I think you'll be able to help with. &lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Dino&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 01:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142879#M715965</guid>
      <dc:creator />
      <dc:date>2009-04-30T01:27:18Z</dc:date>
    </item>
    <item>
      <title>Incremental load with multiple dates</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142880#M715966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;Can you please do the required changes in my document so that incremental load(insert,update and delete) works.&lt;/P&gt;&lt;P&gt;Please look into the application that I have attached and do the required changes.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/forums/t/28159.aspx"&gt;http://community.qlik.com/forums/t/28159.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jul 2010 07:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-with-multiple-dates/m-p/142880#M715966</guid>
      <dc:creator />
      <dc:date>2010-07-20T07:31:46Z</dc:date>
    </item>
  </channel>
</rss>

