Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trying to alter a table with 'long' data type

Re: Trying to alter a table with 'long' data type

From: Michel Cadot <micadot_at_netcourrier.com>
Date: 2000/07/27
Message-ID: <8lou1u$1tpa$1@s2.feed.news.oleane.net>#1/1

You can't change LONG to CLOB, you have to create a new table or a new column and use TO_LOB function:

CREATE TABLE long_table (n NUMBER, long_col LONG); CREATE TABLE lob_table (n NUMBER, lob_col CLOB); INSERT INTO lob_table

   SELECT n, TO_LOB(long_col) FROM long_table;

--
Have a nice day
Michel


as <jetta6NOjeSPAM_at_netscape.net.invalid> a écrit dans le message :
2a2b6a58.cdb737c2_at_usw-ex0105-037.remarq.com...

> I am trying to alter a table with LONG datatype to CLOB, but it
> gives me error
>
> 1 alter table person_involve
> 2 modify
> 3* (RESEARCH_PRO_EXPERIENCE CLOB)
> SQL> /
> (RESEARCH_PRO_EXPERIENCE CLOB)
> *
> ERROR at line 3:
> ORA-22858: invalid alteration of datatype
>
> Does it mean that I have to drop the table and recreate it.
>
> Thanks in advance.
>
>
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
Received on Thu Jul 27 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US