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

Home -> Community -> Usenet -> c.d.o.tools -> Unique Field from a string

Unique Field from a string

From: <designpixs_at_my-deja.com>
Date: Fri, 01 Dec 2000 18:47:35 GMT
Message-ID: <908ro5$kn1$1@nnrp1.deja.com>

I need to get a number field populated (for use as a primary key) using a combination of 8 fields. These 8 fields are varchar2 and will total 175 characters if all were populated to their max size. So, what I need to do is concatinate these 8 fields and then find a way to get a unique number value from it. (i.e. if I have 'THISISATEST' I would get 12345 or 'THISISANOTHERTEST' I would get 12321). The number has to be unique to the string passed in. So if I pass the same string in again I will get the same number but if I pass a different string in I can't get that number. I messed around with DBMS_UTILITY.GET_HASH_VALUE but that produced poor results.

Hope someone can help.

Thanks,
Drew

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 01 2000 - 12:47:35 CST

Original text of this message

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