How to composite two varbinaries
I have two varbinary masks开发者_如何学编程:
@mask1 = 0x0000000000000001
@mask65 = 0x7FFFFFFFFFFFFFFF0000000000000003
I have to
1) composite them to get something like this @mask_composite = @mask1 | @mask65
2) check @mask_composite & @mask2 > 0
How can I do that by using T-SQL?
Here some guy shares a solution.
It's a function that splits varbinaries into ints, applies bitwise logic and merges it back.
精彩评论