Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: store hex - NO hex conversion?
try using a column of datatype RAW
there are two related conversion functions:
HEXTORAW and RAWTOHEX
HTH
"Hardy Merrill" <hmerrill_at_my-deja.com> wrote in message
news:8e26lg$56b$1_at_nnrp1.deja.com...
> I'm writing Perl cgi scripts to/from Oracle 8i with Perl DBI -
I'd like
> to store a hex number(ex: 0x3f) in Oracle, and read it out as
a hex
> number so that I can use it, with as few(0 if possible)
conversions as
> possible, in bitwise comparisons. So far the only method I've
found
> that works is to store the hex number in Oracle as
VARCHAR2(string),
> read it back out into a scalar, and run "dec" on it to convert
it to a
> decimal value. I can use the decimal value in bitwise
comparison's, but
> I'd like to use hex values with no conversions.
>
> There's got to be a better way than the way I'm doing it. Any
help is
> appreciated.
> --
> Hardy Merrill
> Mission Critical Linux
> http://www.missioncriticallinux.com
> 978-446-9166
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Received on Mon Apr 24 2000 - 00:00:00 CDT
![]() |
![]() |