Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
olibara
Yak Posting Veteran
94 Posts |
Posted - 2012-01-25 : 06:36:45
|
HelloIs it possible to do some logical operation on integer within SQL SyntaxAs I can write in VB or CVBA=(A OR B)A=(A AND B)C#A |= B;A &= B; |
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2012-01-25 : 06:39:43
|
[code]BEGIN TRANDECLARE @a INT = 1234DECLARE @b INT = 1436SELECT @a & @b -- Bitwise ANDSELECT @a | @b -- Bitwise ORSELECT ~@a -- Birwize NOTSELECT @a ^ @b -- Bitwise Exlusive ORDECLARE @c INTSELECT @c = (@a ^ @b) -- AssignmentSELECT @cROLLBACK[/code]Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
olibara
Yak Posting Veteran
94 Posts |
Posted - 2012-01-25 : 07:07:39
|
Easy !Thanks a lot Charlie |
 |
|
|
|
|