Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: convert LONG RAW to BLOB
A copy of this was sent to nicky <nicky_at_unilinknet.com>
(if that email address didn't require changing)
On Tue, 02 Nov 1999 13:07:57 GMT, you wrote:
>Hi
>I use Oracle 8i
>How to convert LONG RAW to BLOB in PL/SQL code like following
>
>create or raplace function xxx(...) return long raw ...;
>/
>create procedure yyy(...)
>is
> l_raw long raw;
> l_blob blob;
>begin
>...
> l_blob := xxx(...); -- ???
>...
> insert into zzz values( ..., l_blob, ...);
>end;
>
>10x in advance
>Nicky
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Use the TO_LOB() function available in 8i.
insert into zzz
select a, b, c, to_lob( long_raw_column ) from aaa
/
If you try to use to_lob in a plsql function/procedure, you'll need to use dynamic sql as the plsql engine cannot do the to_lob function, for example, you'll code:
begin
execute immediate
'insert ino zzz select a, b, c, to_lob(long_raw_column) from aaa'; end;
that 'hides' the to_lob call from plsql.
--
See http://osi.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 Nov 02 1999 - 08:28:47 CST
![]() |
![]() |