<?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 without primary key and modification_date column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149916#M28018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to create the PK field in your new rows so they can be compared in the exists. In the load:&lt;/P&gt;&lt;P&gt;$(PKexp) as PK&lt;/P&gt;&lt;P&gt;and then in the concatenate.&lt;/P&gt;&lt;P&gt;Concatenate Load * from $(QVDFILE)(qvd) where not exists(PK, $(PKexp));&lt;/P&gt;&lt;P&gt;I assume your inner join is for deletes. You'll have to create a composite key there as well. Because not all rows in your QVD wil have a PK field, you'll have to regenerate it and then do the inner join. Like this: (not suntax checked)&lt;/P&gt;&lt;P&gt;DROP FIELD PK;&lt;BR /&gt;RIGHT JOIN LOAD DISTINCT *, $(PKexp) as PK RESIDENT $(datatable);&lt;BR /&gt;Inner Join LOAD $(PKexp) as PK;&lt;BR /&gt; Select analysis_date,item from view(nolock);&lt;BR /&gt;DROP FIELD PK;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 02:23:53 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2009-07-24T02:23:53Z</dc:date>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149912#M28014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am facing an issue with performing concatenation in the end of the qvd refresh with a combination of columns. with primary key (with another table) it's working fine, but with combination keys it 's giving error.&lt;/P&gt;&lt;P&gt;Any comments&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Preena&lt;/P&gt;&lt;P&gt;Following is the script:&lt;/P&gt;&lt;P&gt;SET QVDFILE =qvdfile.qvd;&lt;BR /&gt;LET datatable='myDataTable';&lt;/P&gt;&lt;P&gt;IF FileSize('$(QVDFILE)') &amp;gt; 0 THEN&lt;BR /&gt; SET QVD_EXISTS=1;&lt;BR /&gt;ELSE&lt;BR /&gt; SET QVD_EXISTS=0;&lt;BR /&gt;END IF&lt;/P&gt;&lt;P&gt;IF $(QVD_EXISTS) THEN&lt;/P&gt;&lt;P&gt;LOAD max(date(process_time)) as maxdate from $(QVDFILE)(qvd);&lt;BR /&gt; Let testdate = chr(39) &amp;amp; fieldValue('maxdate', 1) &amp;amp; chr(39);&lt;BR /&gt;&lt;BR /&gt; $(datatable):&lt;BR /&gt; Directory;&lt;BR /&gt; Select a.*,month(Baldt) MonthNum from view a(nolock)&lt;BR /&gt; where process_time &amp;gt;= $(testdate) order by Year,Quarter,MonthNum,BalDt;&lt;BR /&gt;ELSE // If Qvd does not exists or deleted, it will do full reload&lt;BR /&gt; $(datatable):&lt;BR /&gt; Directory;&lt;BR /&gt; Select a.*,datepart(dw,BalDt) as wkday from view a(nolock) order by Year,Quarter,MonthNum,BalDt;&lt;BR /&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IF $(QVD_EXISTS) THEN&lt;BR /&gt;Concatenate Load * from $(QVDFILE)(qvd) where not exists(Inventory_id);&lt;BR /&gt;Inner Join Select Inventory_id from view(nolock);&lt;BR /&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;STORE $(datatable) INTO $(QVDFILE);&lt;BR /&gt;Drop table $(datatable);&lt;/P&gt;&lt;P&gt;TestTable:&lt;BR /&gt;Load * from $(QVDFILE)(qvd);&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>Tue, 21 Jul 2009 23:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149912#M28014</guid>
      <dc:creator />
      <dc:date>2009-07-21T23:07:14Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149913#M28015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your example I see only one key (Inventory_id) shown. What are the other fields in your key? If your key consists of multiple fields, you must aggregate them into a single compund field for the exists() to work. I typically use autonumberhash128() to create the keys.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 02:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149913#M28015</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-07-22T02:18:39Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149914#M28016</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;I tried using autonumberhash also but its giving error.'out of virtual memory' after reloading the report.&lt;/P&gt;&lt;P&gt;query structure is like as follows:&lt;/P&gt;&lt;P&gt;SET PKexp=autonumberhash128(analysis_date,item);&lt;/P&gt;&lt;P&gt;IF $(QVD_EXISTS) THEN&lt;BR /&gt;Concatenate Load * from $(QVDFILE)(qvd) where not exists($(PKexp));&lt;BR /&gt;Inner Join Select analysis_date,item from view(nolock);&lt;BR /&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 17:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149914#M28016</guid>
      <dc:creator />
      <dc:date>2009-07-23T17:47:20Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149915#M28017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's giving error on inner join statement . On running concatenate, it's not giving any error but also not concatenating the new records with the existing one of qvd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 20:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149915#M28017</guid>
      <dc:creator />
      <dc:date>2009-07-23T20:11:20Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149916#M28018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to create the PK field in your new rows so they can be compared in the exists. In the load:&lt;/P&gt;&lt;P&gt;$(PKexp) as PK&lt;/P&gt;&lt;P&gt;and then in the concatenate.&lt;/P&gt;&lt;P&gt;Concatenate Load * from $(QVDFILE)(qvd) where not exists(PK, $(PKexp));&lt;/P&gt;&lt;P&gt;I assume your inner join is for deletes. You'll have to create a composite key there as well. Because not all rows in your QVD wil have a PK field, you'll have to regenerate it and then do the inner join. Like this: (not suntax checked)&lt;/P&gt;&lt;P&gt;DROP FIELD PK;&lt;BR /&gt;RIGHT JOIN LOAD DISTINCT *, $(PKexp) as PK RESIDENT $(datatable);&lt;BR /&gt;Inner Join LOAD $(PKexp) as PK;&lt;BR /&gt; Select analysis_date,item from view(nolock);&lt;BR /&gt;DROP FIELD PK;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 02:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149916#M28018</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-07-24T02:23:53Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149917#M28019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I ve implemented code above but it is taking 1 and half hour to load qvd file and using Buffer(Incremental) keyword it took 40 minutes is there any way to improve load process further?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 19:07:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149917#M28019</guid>
      <dc:creator />
      <dc:date>2009-08-04T19:07:34Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149918#M28020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If Table size is too huge then it will run out of memory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can we use conditional delete in that case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 22:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149918#M28020</guid>
      <dc:creator />
      <dc:date>2009-10-08T22:09:48Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149919#M28021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Rob,&lt;BR /&gt;i know this thread is pretty old. but I am a newbie and have arrived here after searching for the exact same problem.&lt;BR /&gt;could you attach an example of the way you are creating the Hash key of field values and then stroring it, so as to use it as a Primary key. &lt;/P&gt;&lt;P&gt;I tried but doesnt seem to work ..&lt;BR /&gt;it would be helpuful if you could provide an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Leo .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 09:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149919#M28021</guid>
      <dc:creator />
      <dc:date>2011-10-24T09:48:18Z</dc:date>
    </item>
    <item>
      <title>Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149920#M28022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Leo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a computer available at the moment to provide a complete example, but the composite key is created&amp;nbsp; using the autonumber autonumberhash128 function. Look them up in the help. If you are going to store the key with the data then use the hash128 function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 02:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149920#M28022</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-10-28T02:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149921#M28023</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;In above comment you suggest to create primary key by following code "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(PKexp) as PK". But I'm not getting how will you create that PKexp ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;My current situation:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have data in excel format which update everyday. We have date field and we can use that as &lt;STRONG&gt;Modified Field, &lt;/STRONG&gt;but we don't have any filed that can be used as Primary Key. Also not getting any unique combination to create any composite key using Autonumber function. In that situation how to create Primary Key explicitly? I'm stuck into it badly. Please help.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 18:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149921#M28023</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2017-05-23T18:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental Load without primary key and modification_date column</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149922#M28024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The $(PKexp) variable was created earlier in the thread with a SET statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the Date field as your key, but in this case it will be a group key, not a primary key. So as long as you are ok with always replacing the entire set for a Date try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MyData:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date as Date2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... FROM xyz.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (&lt;SPAN style="font-size: 13.3333px;"&gt;MyData&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt; LOAD * FROM MyData.qvd (qvd)&lt;/P&gt;&lt;P&gt;WHERE NOT EXISTS (Date, Date2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 21:51:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-Load-without-primary-key-and-modification-date/m-p/149922#M28024</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-05-23T21:51:02Z</dc:date>
    </item>
  </channel>
</rss>

