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: Traslating LONG RAWs to CLOBs..

Re: Traslating LONG RAWs to CLOBs..

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 03 Aug 1999 18:05:28 GMT
Message-ID: <37b72ebd.17609601@newshost.us.oracle.com>


A copy of this was sent to A Dellelce <uh886_at_victoria.tc.ca> (if that email address didn't require changing) On Tue, 03 Aug 1999 18:57:44 +0200, you wrote:

>
>hello to all !!
>
>I need some help with trasling a table with LONG RAWs to a table with
>CLOBs .. anyone has a *simple* script which makes such a
>a traslation??
>

Well, firstly -- a long raw is binary and a CLOB is character, there will be issues with that.

In Oracle8, release 8.0, you will have to unload the LONG RAWs and reload them. reloading them is easy with dbms_lob.loadfromfile. Unloading them takes a bit of work. If you are interested -- I have an 'unload' program that unloads long raws into separate files (a file per row). You need a c compiler for this.

In Oracle8i, release 8.1, you can:

insert into T select to_lob(long_raw_column) from T2;

to turn a long raw into a BLOB (not a CLOB but a BLOB). It will turn a LONG into a CLOB.

If you really meant that you have a table with LONGs (not long raws) and want to convert that into CLOBS, we can do that in 8.0 with plsql alone.

>
>thank you all !!
>
>
>Antonio --- neaya_at_yahoo.com

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Aug 03 1999 - 13:05:28 CDT

Original text of this message

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