Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Unique Field from a string
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
![]() |
![]() |