-
Oracle binary comparison
This question was given to me by one of our develpers. I'am not familar with this at all so any thing you can help out with. Thanks
SQLServer lets me do this query:
select * from myTable where x & 8 = 8
x is a number column in myTable. This query does a logical comparison on the binary value of x. So, if x = 12 (binary 1100) then the result of x & 8 is 8. The result of x & 4 is 4. This is very nifty. I can't find a corresponding operator in oracle. Can you please check into it and see if oracle supports that kind of comparison.
Does anybody know how I can do this is Oracle.
-
that's a binary AND operation, right?
Documented in the SQL Reference here
-
Originally posted by slimdave
that's a binary AND operation, right?
Documented in the SQL Reference here
Perhaps the reason why BITAND function is so astonishingly unknown among Oracle comunity is to be attributed to the fact that it has not been documented in Oracle manuals for such a long time. Although it has been available and in use at least since early Oracle7, it has found its way into documentation only in 8.1.7 for the first time! Why they (Oracle Corp.) have been "hiding" this particular function for such a long time (while using it extensively themselves in data dictionary) will allways remain a mistery to me.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|