开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜