Lynn_AccessUser
Registered User.
- Local time
- Today, 14:20
- Joined
- Feb 4, 2003
- Messages
- 125
I have the following code:
SELECT ClassID, COUNT(*) AS Total
FROM dbo.tbl_Claimant
GROUP BY ClassID
The problem is I want to filter out PersonID <> 20 but when I do that I have to put PersonID in the group by and then it groups it by PersonID instead of just ClassID. So instead of getting 10 ClassID with a count I get 100 records with a count.
Any suggestions?
SELECT ClassID, COUNT(*) AS Total
FROM dbo.tbl_Claimant
GROUP BY ClassID
The problem is I want to filter out PersonID <> 20 but when I do that I have to put PersonID in the group by and then it groups it by PersonID instead of just ClassID. So instead of getting 10 ClassID with a count I get 100 records with a count.
Any suggestions?