Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Bitwise operators and binary data
There are no functions that deal with binary operators, but you
can do it by yourself.
like
function bit_test(n in number, p in number) return number is
begin
if mod(trunc(n/power(2,p)),2)=1 then return 1; else return 0; end if;
and you can use it like:
select field1 [,field2....] from table
where bit_test(your field,place)=1;
place is the bit you want to check that is set to 1. (starting from 0)
Hope it helped you,
for further details/questions you can find me at uTOK
(www.uTOK.com) and join the oracle group.