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: Copying LONG datatype data to table

Re: Copying LONG datatype data to table

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Thu, 27 Jun 2002 18:42:51 +0400
Message-ID: <aff89g$27p$1@babylon.agtel.net>


If you really need that data for backup purposes only, I would suggest converting LONG to BLOB:

create table table_bu as select col1, col2,... TO_LOB(long_col),... from table_main;

This will convert your LONG to BLOB on the fly (TO_LOB() is supposed to be used in such cases only). BLOBs are much more versatile and usable than LONGs.

-- 
Vladimir Zakharychev (bob@dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


"markag" <member_at_dbforums.com> wrote in message news:3d1aad43$1_at_usenetgateway.com...

> HI all,
>
> I have a table called TABLE_MAIN that has a LONG datatype column in it.
> I want to copy the entire table structure and it's data to a new table
> called TABLE_BU. I tried this:
>
> CREATE TABLE TABLE_BU AS SELECT * FROM TABLE_MAIN
>
> and got this error:
>
> ERROR at line 1: ORA-00997: illegal use of LONG datatype
>
> I need a quick and dirty way to create this table and get that
> data into it.
>
> TIA
>
>
>
> --
> Posted via dBforums
> http://dbforums.com
Received on Thu Jun 27 2002 - 09:42:51 CDT

Original text of this message

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