I see this post is pretty old and there are some useful answers but this is a pretty crazy straight forward method…
Select
SUM(DISTINCT(n & 0x01)) +
SUM(DISTINCT(n & 0x02)) +
SUM(DISTINCT(n & 0x04))
as OrN
From BitValues
I see this post is pretty old and there are some useful answers but this is a pretty crazy straight forward method…
Select
SUM(DISTINCT(n & 0x01)) +
SUM(DISTINCT(n & 0x02)) +
SUM(DISTINCT(n & 0x04))
as OrN
From BitValues