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 |
|
andrewcw
Posting Yak Master
133 Posts |
Posted - 2005-11-07 : 13:34:54
|
| I cant seem to 'see' the syntax to formulate a query that will give me the ( count ) number of failure as grouped by a column. Column A represent step Numbers, B the status, C the attempt # - but its not important in this query, the count based on <> 'PASS' is.A B C205.1 FAIL 1205.1 PASS 2205.1 FAIL-Y 3205.1 PASS 4206.1 FAIL 1206.1 FAIL-XYZ 2206.1 FAIL 3206.1 PASS 4Number of not passed conditions per column A205.1 2206.1 3Thanks very much !andrewcw |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2005-11-07 : 13:52:49
|
Id rather see a status_id in place of your 'FAIL-XYZ', etc... but you should be able to modify this query to do what you want:select a, count(*) as 'fail_count'from yourTablewhere b like 'FAIL%'group by a Nathan Skerl |
 |
|
|
andrewcw
Posting Yak Master
133 Posts |
Posted - 2005-11-07 : 14:16:24
|
| Thanks ! it works !andrewcw |
 |
|
|
|
|
|