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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How do I copy LONG columns between tables?

Re: How do I copy LONG columns between tables?

From: Dave Adkins <dadkins21_at_home.com>
Date: Wed, 29 Nov 2000 10:38:25 GMT
Message-ID: <B05V5.30459$g6.12856411@news1.elmhst1.il.home.com>

Here is the usage of the COPY command, which allows longs:

COPY FROM <db> TO <db> <opt> <table> {(<cols>)} USING <sel>

<db>    : database string, e.g., scott/tiger_at_prod
<opt>   : ONE of the keywords:  APPEND, CREATE, INSERT, or REPLACE
<table> : name of the destination table
<cols>  : a comma-separated list of destination column aliases
<sel>   : any valid SQL SELECT statement

You can set long to any large value as long as it is larger than the max length of any long column in the table.
Exception is that sqlplus commands cannot handle a long greater than 64k. The long column will always be truncated at 64k. The following are examples of settings you'll want to make before executing the copy command:
set long 2000000000
set copycommit 1
set arraysize 100

Stefan Larsson <d95stela+news_at_dtek.chalmers.se> wrote in message news:slrn91ssp5.srr.d95stela+news_at_licia.dtek.chalmers.se...
> Oracle won't let me copy data between the tables with
> statements like
>
> INSERT INTO Elements2
> SELECT id_, elt_ FROM Elements1;
>
> because the LONG datatype is not allowed in insert select lists,
> in fact, the LONG datatype seems to be disallowed almost everywhere.
Received on Wed Nov 29 2000 - 04:38:25 CST

Original text of this message

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