Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: dbms_HASH...or something like it?...comparing data...

Re: dbms_HASH...or something like it?...comparing data...

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sat, 22 Jan 2005 23:13:11 -0000
Message-ID: <003101c500d7$f1581f20$6702a8c0@Primary>

You could have a look at procedure

    dbms_utility.get_hash_value()
described in dbmsutil.sql

This turns an input string into a number.

Make sure your developer is aware that
two items that hash to the same value do not necessarily hold the same original value.

Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html Public Appearances - schedule updated Dec 23rd 2004

Need some help.

Developer has a wide table...20 columns. He would like to add a 21st column to the table. Then he would like to (be able to) store the first=20 20 columns data in concatenated form in the 21st column. For example;
col1, col2, col3
Joe,Smith,JoeSmith

No problem PL/SQL program can handle this, BUT he would rather store the 20 concatenated columns in=20 a simpler, tighter form. He suggested "hashing" the=20 20 concatenated columns to (I guess) an Alphanumeric string?

And given that this is possible, what would be the=20 best/required data type for the hashed data?

Why you ask?
Because he want to be able to compare rows=20 (against new data) simply and quickly without selecting and=20 concatenating all 20 originally columns.

So he would store the hashed version of a row (data) on Insert. Then on Update using a function hash the update data and compare it to the already hashed value in the row. =20
Any help is appreciated?
Any other solution is appreciated, BUT his program is limited and=20 can only S,I,U,D and call PROCEDURES or FUNCTIONS.

Please reply directly to me as well as to the list.

Thanks in advance,

Chris Marquez
Oracle DBA
HEYMONitor(tm) - heymonitor.com
"Oracle Monitoring & Alerting Solution"

--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Sat Jan 22 2005 - 18:15:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US