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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: New bee: How to convert 'LONG' data

Re: New bee: How to convert 'LONG' data

From: Thomas Day <tday6_at_csc.com>
Date: Thu, 23 May 2002 04:48:20 -0800
Message-ID: <F001.00468F2F.20020523044820@fatcity.com>

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        <ORACLE-L_at_fatcity.com>                            
                    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: sridhar.moparthy_at_wcom.com

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: ListGuru_at_fatcity.com (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: tday6_at_csc.com

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: ListGuru_at_fatcity.com (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). Received on Thu May 23 2002 - 07:48:20 CDT

Original text of this message

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