Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: BITAND with large integers
"Raj Jamadagni" <rajsun_no_spam_at_email.com> wrote in message
news:J9WdncX8V9y6XEKiRVn-vw_at_comcast.com...
> Have you tried using utl_raw.bit_and() ??
>
> Raj
Thanks for the suggestion. utl_raw.bit_and() looks promising but I don't know an efficient way of converting the Oracle NUMBER type to an equivalent 128-bit integer representation cast as RAW. (This is assuming the number is a non-negative integer with up to 38 decimal digits.)
Another approach I thought of since my last post to define a Java function that applies a bit-wise AND to two integers. However, this appears to be limited to a mximum of 64 bits (using the Java LONG type). Still, it's better than the apparent 32 bit limitation of Oracle's BITAND. I'm not sure of the performance overhead in using a Java function like this in SQL - e.g. converting from Oracle NUMBER to Java LONG.
Matt Received on Wed Dec 17 2003 - 17:43:28 CST
![]() |
![]() |