We need to store approx 200 bitfields so we thought we'd use a binary datatype.
We can set the bit fields easily using
set bitfield = bitfield | 1
set bitfield = bitfield | 2
set bitfield = bitfield | 4
However we don't want to hard-code these values we like to use a table like this
update tableA
set bitfield = bitfield | table.value
where ..... table.mask = "MASK1"
However, it seems there is a limitation where you can only OR/AND a binary datatype with an integer.
So the column table.value can only go up to 64 bits.
Why can't we use AND/OR betweem two binary columns ?
Is there some sort of work around ?
(Any chance of any changes in ASE ?)
Incidently MS-SQL suffers the same problem.