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 |
|
jweizman
Starting Member
27 Posts |
Posted - 2002-02-25 : 06:26:37
|
| HiAssuming i have a table with one boolean FieldHow could i have in one select the number of False and number of true ?Jonathan |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-02-25 : 07:29:39
|
| select count(case columnname when true then 1 else null end) NoOfTrue,count(case columnname when false then 1 else null end) NoOfFalsefrom tablenameCheck for Case in BOL.HTH-------------------------------------------------------------- |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2002-02-25 : 07:42:58
|
| select convert(int,bitfield), count(bitfield) from repositorygroup by convert(int,bitfield)should work. |
 |
|
|
|
|
|