convert CLOB column to NCLOB
imagic1Aug 17 2010 — edited Aug 17 2010Hi,
We are going to change our application to unicode.
In the database all column will be converted to their unicode pair (i. e. varchar2 -> nvarchar2).
The following command does not work on Oracle 9i R2, only on 10g and 11g:
UPDATE CALIBRATION SET IATMP123 = IC_DBFIELDS;
ORA-12704: ...
IATMP123 NCLOB, (unicode)
IC_DBFIELDS CLOB, (non unicode)
Because "MODIFY" command does not work on CLOB column types (to NCLOB), I have to copy contents of old CLOB column to a temporary unicode column.
After this Old column will be deleted, temporary rename to old one.
What conversion function have I to use??? (cast, convert, unistr or other?)
IC_DBFIELDS CLOB can be any character set type!
It is working on 9i R2:
UPDATE CALIBRATION SET IATMP123 = UNISTR(IC_DBFIELDS);
Best Regards,
Imre