3 Replies Latest reply: Feb 13, 2013 6:19 AM by Perumal Ayyappan RSS

    AutoNumber, AutoNumberHash128 and AutoNumberHash256 Problem

      Hi Dear QV Comnunity

       

      I have a problem when I try to apply the function AutoNumberon a key that is in two tables from two different source types, but contain the same string, I quote an example

       

       

      Country --->%KeyAccount

      Information from a table in Oracle by concatenating a key 230320430_2010_08

       

       

      Load AutoNumber (KeyAccount & "_" & Year & '_' Month) As %KeyAccount

                 , Other fields;

      SELECT KeyAccount, Year, Month, Other Fields

      FROM ORACLE_TABLE

       

       

       

       

      Transaccion--->%KeyAccount

      Information from an Excel spreadsheet by concatenating a key 230320430_2010_08

       

       

      Load AutoNumber (KeyAccount & "_" & Year & '_' Month)   As %KeyAccount

                 , Other fields;

      FROM BOOK.XLS;

       

      My problem is that in both cases I get a different result

       

      Country --->%KeyAccount = 1234

      Transaccion--->%KeyAccount = 83121

       

      I tried with AutoNumber, AutoNumberHash128 and AutoNumberHash256 include the 2nd,3rd ... parameters

       

      AutoNumberHashXXX (KeyAccount, Year,Month )

      AutoNumberHashXXX (KeyAccount, Year,Month,KeyAccount & "_" & Year & '_' Month )

      AutoNumberHashXXX (KeyAccount& "_" , Year & "_" ,Month,KeyAccount & "_" & Year & '_' Month )

       

      But not work