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: Copying an Oracle Long/Long Raw column

Re: Copying an Oracle Long/Long Raw column

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Wed, 28 Jul 1999 21:25:15 GMT
Message-ID: <379f6e2c.29832837@inet16.us.oracle.com>


On Wed, 28 Jul 1999 20:36:53 GMT, srjohns1024_at_my-deja.com wrote:

>We are currently using Oracle 7.x
>
>We need to duplicate a row containing a Long into the same table (only
>changing the primary key).

With pl/sql and the assumption that the long and long raw are under 32K then...

declare
  l_long long;
begin
  for c in ( select l from foo ) loop
    insert into foo values ( seq.nextval, c.l );   end loop;
end;

  ... and ...
>
>We also need to duplicate a row containing a Long Raw into the same
>table (only changing the primary key).

declare
  l_longraw long raw;
begin
  for c in ( select lr from bar ) loop
    insert into bar values ( seq.nextval, c.lr );   end loop;
end;

  ... should work just fine.

>
>Can anyone assist us with this problem?

hope this helps.

chris.

>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Jul 28 1999 - 16:25:15 CDT

Original text of this message

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