Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: INSERT INTO and LONG columns

Re: INSERT INTO and LONG columns

From: <xjbshaw_at_ingr.com>
Date: 1998/02/04
Message-ID: <ps9G#abM9GA.113@news2.ingr.com>#1/1

use the copy command.

Here is the syntax and info on the SQL*Plus Copy command straight from the Oracle 8 Documentation CD.  As you can see, you can use the copycommit and arraysize variables to commit when you want. This copy command also works in Oracle 7.

COPY
Purpose: Copies the data from a query to a table in a local or remote database. Syntax
COPY {FROM username[/password]@database_specification| TO

username[/password]@database_specification| FROM
username[/password]@database_specification TO
username[/password]@database_specification} {APPEND|CREATE|INSERT|REPLACE}
destination_table [(column, column, column ...)] USING query

In article <34D87A9B.F7EF639C_at_yale.edu>, Rod Gustavson <rod.gustavson_at_yale.edu> writes:

>Does anyone have a suggestion on how to accomplish the following?
>
>I am trying to copy all the rows from a table to itself, but with one
>value changed. One of the columns is of type LONG, so INSERT INTO
>returns error ORA-00997, Illegal use of LONG datatype.
>
>Example:
>column_a, column_b, and column_c are numbers, column_d is a LONG.
>
>INSERT INTO my_table
> SELECT column_a,
> 2,
> column_c,
> column_d
> FROM my_table
> WHERE column_b = 1
>
>If column_d is not a long, the code works.
>
>Any suggestions on how I can accomplish this?
>
>Thanks.
>
>_______________________
>
>Rod Gustavson
>rod.gustavson_at_yale.edu
Received on Wed Feb 04 1998 - 00:00:00 CST

Original text of this message

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