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

Home -> Community -> Usenet -> c.d.o.misc -> Re: bitmask operations and SQL

Re: bitmask operations and SQL

From: Marc Billiet <Marc.Billiet_at_village.uunet.be>
Date: Thu, 28 May 1998 22:07:01 +0200
Message-ID: <6kkggt$pmc$1@xenon.inbe.net>


There exists a (undocumented) function 'bitand' which allows to do what you want. It doesn't return a boolean, but the result of the 'and' operation (27 and 4 = 4).

e.g.

select *
from x
where bitand(27,4) = 4

Unfortunately, there is no bitor nor bitxor.

Christopher J. Nalbone wrote in message <3562D2C5.9F83836A_at_bms.com>...
>Are there any SQL operators that support bitmask operations? I'd like
>to know if a certain bit within a number (integer) is set. For example,
>
> number in question number I'm interested in
> (decimal) (binary) (decimal) (binary)
> 27 11011 4 00100
>
Received on Thu May 28 1998 - 15:07:01 CDT

Original text of this message

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