Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need help...
Message
De
22/01/2001 01:46:25
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
I need help...
Divers
Thread ID:
00466473
Message ID:
00466473
Vues:
44
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!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform