Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are trying to make our product compatible with Oracle. Upto now, we support MS Access and SQL Server. We are searching for the Oracle equivalent of:
SQL Server:
UPDATE MyTable SET MyColumn = MyColumn & ~ 256

Access:
UPDATE MyTable SET MyColumn = MyColumn BAND BNOT 256

Thanks a lot for your hints.
Posted

1 solution

Eventually I discovered a useful search term for Google (+oracle +number +xor) and then found out that Oracle has only one logical operator for numbers: BITAND. With BITAND and some math, other operators can be calculated (see also http://database.itags.org/oracle/22028/[^])
Hence, the solution is:
Oracle:
UPDATE MyTable SET MyColumn = BITAND(MyColumn, (-1 -256))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900