Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: long to clob conversion.
You cannot change a column's datatype to a LOB or REF datatype, therefore you must create a new column using the statements in the solution description
You need to create a new column of the desired type.Copy the current column data to the new type using the appropriate type constructor.
Use the following steps:
-OR-
2. INSERT INTO table_name (new_column_name)
VALUES (SELECT old_column_name FROM table_name) WHERE (see note below); NOTE: Use a join condition to join the sub-query to the outer query.
3. If you do not want to retain the old column data you will have to create
a new table and copy the data from the old table, then drop the old table. You could then rename the new table to the old table name for consistency.
I hope you find this of some help!
Regards
"The Views expressed here are my own and not necessarily those of Oracle Corporation"
John Wang <wang_john_at_bah.com> wrote in message
news:7md90r$5jr$1_at_autumn.news.rcn.net...
> Hi, all:
>
> I have a table that has a long data type in 7.3.3 database. Now, I am
> trying to convert it to a clob datatype in oracle 805. How do I do it? I
> actually have a 8i database. To_lob function in 8i converted it
correctly.
> But 805 does not have it. If I use exp80 to import 8i dump, i get
> "unrecognized statement in the export file". If I use exp80 to export the
> 8i database, I get "invalid column name". Does anyone know how to convert
a
> long to clob?
>
> thanks
>
> jw.
>
>
Received on Mon Jul 19 1999 - 10:48:18 CDT