Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> creating unique text values?
Hello,
I've got a simple Table, TEST, which has one Column A of Type varchar(255).
It could look like this:
A
Now, I would like to make each Value unique by simply adding Spaces to
the right as needed.
So it should look like:
A
B_ B__ B___
Spaces are marked with '_'.
I tried:
UPDATE TEST a SET a.A = RPAD(a.A,
(LENGTH(a.A)+
(SELECT COUNT(*) FROM TEST b WHERE b.A=a.A) - 1) );
but get:
Error in Line2:
ORA-00904: invalid column name
Thanks,
Sebastian Received on Sun Aug 26 2001 - 07:18:09 CDT