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 |
|
jimoomba
Yak Posting Veteran
90 Posts |
Posted - 2011-09-30 : 02:09:44
|
| Hi All,Can anyone provide me the good example for creating a bitmask value and how we use that. Also please provide me example on SUM of bitmasks as well. Its urgent for me guys.Thanks,Ramsrams |
|
|
vmvadivel
Yak Posting Veteran
69 Posts |
Posted - 2011-09-30 : 05:02:11
|
| DECLARE @tblTestBit TABLE (iValue INT) INSERT @tblTestBit SELECT 4 UNION SELECT 15DECLARE @counter INT SET @counter = 0 SELECT @counter = @counter | iValue FROM @tblTestBit --ResultSELECT @counter as [Result]Best RegardsVadivelhttp://vadivel.blogspot.com |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2011-09-30 : 07:55:17
|
xor to the rescue! http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|