Re: SQL*Plus: COPY command, LONG datatype, and ORA-01008

From: Andrew Protasov <oracle_at_protasov.kiev.ua>
Date: 1998/11/12
Message-ID: <ABzVeIsK42_at_protasov.kiev.ua>#1/1


Hi Todd,

You are wrong. COPY command does not insert ... select. It uses two different connections and makes select in the first and insert in the second. It works with LONG columns. But it does not work with LONG RAW columns.

I made FREE utility Table Copy which works in the similar way but supports LANG RAW:

http://protasov.simplenet.com

Andrew Protasov

> As a follow up, I think I found the reason why it doesn't work. One of the
> restrictions on the LONG datatype is that a LONG column cannot be used when
> inserting into a table with a query (i.e., INSERT INTO table_name SELECT
> col_1, col_2 FROM table_2). In essence, this is what the SQL*Plus COPY
> command is doing: INSERTing with a SELECT statement.
>
> This being the case, however, I would have expected to receive the
> "ORA-00997: illegal use of LONG datatype" error, instead of the ORA-01008.
>
> Thanks to all who replied.
>
> Todd
>
> Todd Owers wrote in message <72agf6$eqo$1_at_nntp.gulfsouth.verio.net>...
> > [snip]
> >The problem is that I am getting an "ORA-01008: not all variables bound"
> >error on tables with a LONG column. On tables without a LONG column,
> >everything works fine.
> > [snip]
> >Here is the script.
> > [snip]
> >COPY TO &un/&pw_at_&cs INSERT table_1 USING SELECT * from table_1
> >COPY TO &un/&pw_at_&cs INSERT table_2 USING SELECT * from table_2
> >etc... There are 14 tables in all, 2 of which contain LONG columns.
> >
> >As mentioned above, this script works fine for tables without a LONG
 column,
> >but gives the ORA-01008 error for tables with a LONG column. Thanks in
> >advance for your help and suggestions.
> >
> >Todd Owers
> >toddo_at_gcr1.com
Received on Thu Nov 12 1998 - 00:00:00 CET

Original text of this message