3

Possible Duplicates:
Aggregate bitwise-OR in a subquery
Update column to be different aggregate values

Let's say I have a table with the following records.

Role | AuthorizationNum

1      11
2      12
1      16
2      11

What I want to do is group by Role, the OR (BIT OR using |) AuthorizationNum. So my select should be 2 records.

Role | AuthorizationNum

1      27
2      15

Because...

11 | 16 = 27

11 | 12 = 15

Community
  • 1
  • 1
aherrick
  • 19,799
  • 33
  • 112
  • 188

1 Answers1

0

By default mysql supports this but not sql server. But you can get around it using this: Update column to be different aggregate values

Community
  • 1
  • 1
JonH
  • 32,732
  • 12
  • 87
  • 145