Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Logical operations on binary columns

$
0
0

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.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>