Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Bitwise masking...

Re: Bitwise masking...

From: Jake Anderson <jakeanderson_at_byu.edu>
Date: Fri, 29 Dec 2000 10:20:59 -0700
Message-ID: <92ih5g$fv1$1@acs2.byu.edu>

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

Original text of this message

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