How to append a number to the end of a string?
782237Oct 6 2010 — edited Oct 7 2010Hi SQL gurus
I have a problem...
I am trying to modify a bunch of records so that the unique key (of varchar2 -type) in them gets a number at the end.
The SQL script I am using looks like this (just with more names in it)...
UPDATE PERSONS
SET NAME = NAME ||to_char(rownum)
WHERE NAME IN (
'BIJOY',
'JOSE',
'LARSON',
'ADEL')
In the persons table the "NAME" column needs to be unique.
The problem is that I get the "unique constraint violated" (00001) error when attempting to execute the script.