Otis wrote:
Oracle for example, doesn't support bit based fields, so this can be a problem too.
But you mean you have for example a 32bit field and you want to filter on those fields using a mask?
o yeah Oracle that other databse
We use these fields to track two-valued attributes. For example
instead of adding columns bFoo1,Foo2,bFoo3,bFoo4 we would add one column of integer datatype.
bFoo1 - Bit Value = 1
bFoo2 - Bit Value = 2
bFoo3 - Bit Value = 4
bFoo4 - Bit Value = 8
A query to retrieve these values would look something like this
SELECT
CASE WHEN (1 & StatusVector) = 0 THEN 0 ELSE 1 END AS bFoo1 , --BitPlace 0
CASE WHEN (2 & StatusVector) = 0 THEN 0 ELSE 1 END AS bFoo2 , --BitPlace 1
CASE WHEN (4 & StatusVector) = 0 THEN 0 ELSE 1 END AS bFoo3 , --BitPlace 2
CASE WHEN (8 & StatusVector) = 0 THEN 0 ELSE 1 END AS bFoo4 , --BitPlace 3
FROM .....
I would like to use the 2 class project. In by inherited classes I would perform the bitwise operations, but I still would like to use the bitwise predicate to filter the results.