Home All Groups Group Topic Archive Search About

2005: How to SELECT a Bitmask?

Author
17 Apr 2007 10:10 PM
Andreas Klemt
Hello,

I have this values:
1 = value_a
2 = value_b
4 = value_c
8 = value_d
16 = value_e

Now I add some values like a+b+c = 7 and put it in my table

value
7
1
16

How can I select to get the value_b?

In VB.NET I do it like this
IF value AND value_b THEN ....


Thanks for any help!
Andreas

AddThis Social Bookmark Button