Re: trying to copy a long raw column

From: Jurij Modic <jmodic_at_src.si>
Date: 1998/10/11
Message-ID: <362115c4.2339094_at_news.siol.net>#1/1


On Sun, 04 Oct 1998 17:41:17 GMT,
jeremyr_at_no-spam-today-thanks.dircon.co.uk (Jeremy Russell) wrote:

>I have a table set up with a 'Long Raw' column, that contains picture
>information. The pictures display just fine in D/2000 - however, I
>would like to copy selected rows from the table. Using the SQL
>statement
>
>create table copy as select * from original
>
>only produces the error "ORA-00997: illegal use of LONG datatype" - if
>I create with "where 1=0" - I get the same - if I create a fresh and
>empty table and "insert into copy select * from original" - I get just
>the same again.
>
>How am I using the LONG datatype illegally?

Look at SQL*Plus's command COPPY. It anables you to copy data from one table to another, including LONG columns. For the exact sysntax look in SQL*Plus manual, for creating a COPY_TABLE and populating it with the rows from CARS in the same schema with single command it will be something like:

COPY TO my_username/my_pwd_at_my_db CREATE copy_table - USING SELECT * FROM cars;

Don't forget to set LONG env variable in SQL*Plus to some large value (large enough to save your largest LONG data) before using COPY command. Namely, COPY truncates LONG data to the length set by SQL*Plus's LONG setting.

HTH,

--
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)
================================================
The above opinions are mine and do not represent
any official standpoints of my employer
Received on Sun Oct 11 1998 - 00:00:00 CEST

Original text of this message