Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need help...
Message
From
22/01/2001 01:46:25
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
I need help...
Miscellaneous
Thread ID:
00466473
Message ID:
00466473
Views:
43
I have a table like this:

Sys Status
S1 1
S1 1
S1 1
S1 1
S1 2
S2 3
S1 0
S3 1
S2 1
S1 2

where

1 in the status means successful
2 means failed
3 means invalid
0 means pending

i would like to be able to count the status fields and group them like this:

system successful failed pending invalid
s1 4 2 1 0
s2 1 0 0 1
s3 1 0 0 0

note that the columns successful, failed, pending, and invalid, DO NOT contain the value of the status field but rather the count of the types of values in the field. would appreciate any help you could provide. thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform