Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert CLOB column to NCLOB

imagic1Aug 17 2010 — edited Aug 17 2010
Hi,

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
This post has been answered by MichaelS on Aug 17 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2010
Added on Aug 17 2010
1 comment
884 views