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: ORA-00997: How to copy the data from a table to another using long type

Re: ORA-00997: How to copy the data from a table to another using long type

From: Paolo Quaglia <paoloquaglia_at_hotmail.com>
Date: Fri, 22 Nov 2002 09:02:51 +0100
Message-ID: <arkobf$8n3m$1@stargate1.inet.it>


I have Oracle 8.1.7
I solved my problem Using the copy command: in my example the right answer could be:

COPY FROM contentoracle/contentoracle_at_ora8 INSERT content2(id_content,data_contenuto,xml) USING select id_content,data_contenuto,NULL,xml FROM content;

But I Agree with you that long could be replaced with clob object .... but I have this DB ;-((

Any way, Thanks very much

Paolo

"Paul Brewer" <paul_at_paul.brewers.org.uk> ha scritto nel messaggio news:3ddd6f8d_3_at_mk-nntp-1.news.uk.worldonline.com...
> "Paolo Quaglia" <paoloquaglia_at_hotmail.com> wrote in message
> news:arj0it$29rk$1_at_stargate1.inet.it...
> > Hi to all
> > I have created this table with a long data type
> >
> > CREATE TABLE content (
> > id_content number(16) NOT NULL,
> > data_contenuto date NOT NULL,
> > xml long
> > );
> >
> > My intention is to add a column before the xml field
> >
> > I have created another table with the new field
> >
> > CREATE TABLE content2 (
> > id_content number(16) NOT NULL,
> > data_contenuto date NOT NULL,
> > newfield varchar2(255),
> > xml long
> > );
> >
> > Now I HAVE TRIED TO COPY the vals from content to content2 using:
> >
> > INSERT INTO content2 SELECT * FROM content
> >
> > But Oracle says:
> >
> > ORA-00997: illegal use of LONG datatype
> >
> > How can I copy the data of a table with long to another diffirent
> > table??????
> >
> > Thanks very much to all!!
> > Paolo
> >
> >
> Version?
>
> The LONG answer to this could also be long, I'm sad to say.
> But another answer might be to CLOB the thing.
>
> And by the way, I do wish Oracle would practise as they preach, and remove
> longs from the data dictionary.
>
> Regards,
> Angry of Tunbridge Wells.
>
>
>
Received on Fri Nov 22 2002 - 02:02:51 CST

Original text of this message

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