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: Long Raw

Re: Long Raw

From: Stephen C Ashmore <sashmore_at_neonramp.com>
Date: 7 May 2003 05:30:20 -0700
Message-ID: <4ef331c3.0305070430.6fb28ad8@posting.google.com>


"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:<3eb799b9$0$29717$ed9e5944_at_reading.news.pipex.net>...
> "Steve Ashmore" <sashmore_at_neonramp.com> wrote in message
> news:vbf4tbktduku0a_at_corp.supernews.com...
> > One way you can do it is wby writing a simple PL/SQL procedure,
> > another would be to use exp/imp.
>
> I'd like to see the PL/SQL solution, since I understood that for LONG RAW
> data you were basically stuck with an external program.
>
> EXP/IMP should work I believe, as would perhaps database cloning.

A very simple ( and I mean simple) procedure with no commit logic, error logic
or nothing, to copy
table long1(one number, two long raw) to long2(one number, two long raw)
would be:

declare
  cursor copy_cursor is
   select * from long1;
BEGIN
  FOR l_copy_crs IN copy_cursor
   LOOP
        insert into long2 values( l_copy_crs.one, l_copy_crs.two);    END LOOP;
END;
/

I have tested on 8.1.7 and it appears to work. You off course will want to add to it. Received on Wed May 07 2003 - 07:30:20 CDT

Original text of this message

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