Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: converting RAW to Char and vice-versa in S.P
What I mean is converting char types to RAW and opposite:
e.g. :
declare
A varchar2(30);
B raw(3200);
begin
A := 'Hello World!';
B := A;
end;
This ofcourse, is not possible.
I've already found the answer. To to this you have to use the package
UTL_RAW. (If it's not compiled by default, just compile it first)
This package gives me what I wanted (and much more):
The line B:=A will look like this B:= UTL_RAW.CAST_TO_RAW(A); There is also the opposite procedure: CAST_TO_VARCHAR2 to cast from RAW.
Shaul.
In article <383EBE64.8989C3B8_at_0800-einwahl.de>,
Martin.Haltmayer_at_0800-einwahl.de wrote:
> Hi Shaul,
>
> can you give an example of these conversions?
>
> Martin
>
> sbenyo_at_my-deja.com wrote:
> >
> > Hi,
> >
> > I'm looking for a way to convert char type variables
> > to RAW type variables and vice-versa inside a stored procedure.
> > I mean something like HexToRAW for numbers....
> >
> > 10x
> > Shaul
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Nov 27 1999 - 07:49:56 CST