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

Home -> Community -> Usenet -> c.d.o.server -> Re: INSERT INTO Long from Long:

Re: INSERT INTO Long from Long:

From: Matthew MacFarland <matthew_macfarland_at_dril-quip.com>
Date: Mon, 9 Nov 1998 17:05:11 -0600
Message-ID: <727scs$8ca$1@uuneo.neosoft.com>


Hello Randal

You have to do the insert with PL/SQL. Open a cursor with the long values you want to
insert somewhere else. Use and insert statement for each loop of the cursor like:

CREATE PROCEUDRE ADD_LONGS
IS

CURSOR cLong
IS
SELECT *
FROM tab_w_long;

BEGIN     FOR data IN cLong LOOP

        INSERT INTO tab_target (numcol, longcol)
            VALUES(data.numcol, data.longcol);
    END LOOP; END ADD_LONGS; Matthew MacFarland
Dril-Quip, Inc.
matthew_macfarland_at_dril-quip.com

Randal Chapman wrote in message ...
>Hi all.
>
>I need to find the way to INSERT INTO a LONG datatype from a SELECT
>statement (the column in the SELECT statement is also a LONG). I get an
>illegal use of LONG when I try this - and the documentation says you cannot
>use LONG in this way - soooo... what it fails to do is suggest WHAT I use
to
>accomplish this. I know that MS SQL Server provides READTEXT and UPDATETEXT
>for manipulating their version of LONG datatypes. Any suggestions
>appreciated.
>
>Thanks,
>
>_Randal
>
>
Received on Mon Nov 09 1998 - 17:05:11 CST

Original text of this message

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