Use a cursor. Select the data into the cursor from 'x' and then insert it
into 'y'.
-----------------------------------------------
CREATE TABLE Y (
Y_ID NUMBER(10),
Y_LONG LONG,
);
--
cursor x_cursor is
select
X_ID
, X_LONG
from X;
--
BEGIN
For Y_ROW IN X_CURSOR LOOP
INSERT INTO Y
(
Y_ID
,Y_LONG
)
VALUES
(
Y_ROW.X_ID
,Y_ROW.X_LONG
);
END LOOP;
END;
/
Sridhar
Moparthy To: Multiple recipients of list ORACLE-L
<sridhar.mopa <[EMAIL PROTECTED]>
rthy cc:
@wcom.com> Subject: New bee: How to convert 'LONG'
data
Sent by: root
05/22/2002
06:03 PM
Please
respond to
ORACLE-L
Hi,
I have a table 'x' with one of the column as 'LONG'
I would like to copy the data from the above table 'x' into a different
table 'Y' with the same structure.
When I tried "insert into x select * from y" I am getting
"Illegal use of LONG data type".
Could any one please help me to move the data?
Thanks
Sridhar.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Sridhar Moparthy
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Thomas Day
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).