Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need help...
Message
From
23/01/2001 20:51:27
 
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00466473
Message ID:
00467706
Views:
10
You're a miracle-worker! Thank you very, very much!


>Hi!
>
>Try following:
>
>Select Sys, COUNT(CASE WHEN Status=1 THEN 1 ELSE 0 END) as successful,
>COUNT(CASE WHEN Status=2 THEN 1 ELSE 0 END) as failed,
>COUNT(CASE WHEN Status=3 THEN 1 ELSE 0 END) as invalid,
>COUNT(CASE WHEN Status=0 THEN 1 ELSE 0 END) as pending
>FROM MyTable GROUP BY Sys
>
Previous
Reply
Map
View

Click here to load this message in the networking platform