SQL SELECT WHERE value is "Binary AND a paticular Binary number"?

mdlueck

Sr. Application Developer
Local time
Today, 01:57
Joined
Jun 23, 2011
Messages
2,648
I am storing various bit mask data as a Base 10 number in a table column.

With said value, I run a VBA Binary AND upon the stored number to determine if a particular bit is 1/0, thus I know the state of that attribute value.

Is there some way to have SQL Server select based on that same scenario... only select records where the stored value is true of "AND 8" as example? I would need returned all records where the 8 bit is true of the Base 10 number.
 
Thank you, tehNellie. I will submit my question to that blog post. There was no example of binary functions being used in a WHERE clause.
 

Users who are viewing this thread

Back
Top Bottom