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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Bitwise OR agregate function

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-12-16 : 06:58:12
John writes "I am looking for a way (without a cursor) to do an aggregation on a column using a bitwise OR or AND expression.

Example of what I am looking to do (in pseudo code)

SELECT BITWISEORAGGREGATE(MyBitmaskColumn)
FROM Table1
WHERE (whatever)
ORDER BY (Something)

Any ideas?"

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-12-16 : 09:45:48
Here you go:

http://weblogs.sqlteam.com/jeffs/archive/2004/07/11/1744.aspx

Post here if you have any questions or comments on the techniques shown.

- Jeff
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2004-12-16 : 13:09:32
Nicely done, Jeff.

HTH

=================================================================

Happy Holidays!
Go to Top of Page
   

- Advertisement -