<?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 Does autonumberhash256 create UNIQUE values based on its composing fields? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Does-autonumberhash256-create-UNIQUE-values-based-on-its/m-p/213474#M67198</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 already got feedback on this and it seems that the returned value will always be sequential unless the loading of the two tables is in the same qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2010 14:34:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-15T14:34:37Z</dc:date>
    <item>
      <title>Does autonumberhash256 create UNIQUE values based on its composing fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Does-autonumberhash256-create-UNIQUE-values-based-on-its/m-p/213473#M67197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Does anybody know if the autonumberhash256 function returns unique values for the same input fields? Its the definition of hashing, I know, but I seem to get sequential values!&lt;/P&gt;&lt;P&gt;I use it somewhat like this:&lt;/P&gt;&lt;P&gt;I have two tables (one for BUDGET and one for SALES) I store in two qvd, and before I store them I create this concatenated PK in both tables (this is done in different qvw):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;autonumberhash256(MONTH_ID, STORE_ID, SUPPLIER_ID, BRAND_TYPE, CATEGORY_ID)as PK_BUDG&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;When I load them in another qvw I need to find out what exists in one table that doesn't exist in the other:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;Budget_Temp:&lt;BR /&gt;LOAD PK_BUDG,&lt;BR /&gt;MONTH_ID,&lt;BR /&gt;STORE_ID,&lt;BR /&gt;SUPPLIER_ID,&lt;BR /&gt;BRAND_TYPE,&lt;BR /&gt;CATEGORY_ID&lt;BR /&gt;FROM $(srcFile_Budgets) (qvd)&lt;BR /&gt;WHERE NOT EXISTS (PK_BUDG); //everything that has budget but not sales&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;This fetches 0 lines (vs not using autonumberhash256() and just concatenating the fields for the PK, which fetched about 5M rows). What happens is: the SALES table has two years of sales and the PK begins in 2008-01 whilst the BUDGET table has only 1 year and the PK begins in 2009-01. I've peeked the first lines of each table stored to qvd and I reallized the PK seems sequential (beginning in 1, 2, 3,...(...) for 2008-01 in sales qvd and beginning in 1, 2, 3,...(...) for 2009-01 in budget qvd).&lt;/P&gt;&lt;P&gt;The sales table has about 130 million rows and the budget table has about 12 million rows so thats why it makes a huge difference when I use the autonumberhash!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any ideas why this happens? Shouldn't I get an unique value instead of a sequential one? I've searched the forum and got nothing about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Marina Carvalho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2010 12:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Does-autonumberhash256-create-UNIQUE-values-based-on-its/m-p/213473#M67197</guid>
      <dc:creator />
      <dc:date>2010-01-15T12:35:12Z</dc:date>
    </item>
    <item>
      <title>Does autonumberhash256 create UNIQUE values based on its composing fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Does-autonumberhash256-create-UNIQUE-values-based-on-its/m-p/213474#M67198</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 already got feedback on this and it seems that the returned value will always be sequential unless the loading of the two tables is in the same qvw.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2010 14:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Does-autonumberhash256-create-UNIQUE-values-based-on-its/m-p/213474#M67198</guid>
      <dc:creator />
      <dc:date>2010-01-15T14:34:37Z</dc:date>
    </item>
  </channel>
</rss>

