Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> bitmask comparison in a SELECT statement
I can't find how to do a bitmask compare in a select.
I explain: programmatically, if I want to know if a particular bit in a
binary number is set, I do an "and" comparison, for example:
decimal 5 = binary 101 101 and 100 = 100 (third bit is set) decimal 8 = binary 1000 1000 and 100 = 0 (third bit is not set)
well, in a select statement, I thouth to do the same, like in this example:
SELECT * from MyTable
where (myBinaryNumber and 100) = 100
... how to write it correctly?
Thanks
Regards
Received on Mon Mar 08 2004 - 02:50:05 CST
![]() |
![]() |