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 |
|
itsrahulk
Starting Member
2 Posts |
Posted - 2010-04-16 : 04:51:37
|
| hi.i have a table belowmsisdn zmu retailer cif_status9895999 ewew3443 4343434 Y434434 43434343 34343 N334343 4334343 4344344 Y323232 343434 43434343 Ni need count of all msisdn, count of all zmu and count of cif_status who have 'N' only please help me how could i solveas when i impoese condition in my query for cif_status ='N'it gives me count of only 'N' records.i need all the count of msisdn, zmu but count of cif_status who has 'N'Thanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-04-16 : 04:54:46
|
count(case when cif_status='N' then 1 else 0 end) as count_of_cif_status_N No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2010-04-16 : 18:23:45
|
| SUM(case when cif_status='N' then 1 else 0 end) as count_of_cif_status_N=======================================A couple of months in the laboratory can save a couple of hours in the library. -Frank H. Westheimer, chemistry professor (1912-2007) |
 |
|
|
|
|
|