Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Bitwise masking...
There is an undocumented function Bitand in PL/SQL. Using it an some Boolean algebra you should be able to construct a bitor and bitxor function. I have a bitor function
CREATE OR REPLACE FUNCTION BITOR( x IN NUMBER, y IN NUMBER ) RETURN NUMBER
AS
BEGIN
RETURN x + y - bitand(x,y);
END;
I hope this helps.
Jake
"JAP" <JAP_at_unknown.com> wrote in message
news:f2Q26.21$Gf6.1631_at_news3.voicenet.com...
> I have a (10,0) Number format field that I would like to run logical
bitwise
> operations using masks. For example AND, OR and Exclusive OR
operations...
>
> 0011111111
> 0000001000 AND
> =============
> return TRUE
>
> Is this possible using:
>
> * PL/SQL
> * native or developed functions
> * Stored procedures
>
> Thanks for any help,
> Schmen
>
>
Received on Fri Dec 29 2000 - 11:20:59 CST