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: BITAND with large integers

Re: BITAND with large integers

From: Matt <not_at_this.address.com>
Date: Thu, 18 Dec 2003 10:43:28 +1100
Message-ID: <3fe0e99f$0$18750$afc38c87@news.optusnet.com.au>

"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

Original text of this message

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