ms_access_00
Registered User.
- Local time
- Today, 18:00
- Joined
- Sep 20, 2012
- Messages
- 14
I am having trouble with a select query I am creating. I am only trying to show the number of records with a certain "status" and that the "provider" field begins with KGF and the "Discipline" field isnt equal to PRB.
SQL Code:
I get the an error saying: "You tried to execute a query that does not include the specified expression '[Overall PRB Tracker].Provider Like "KGF*" And Not [Overall PRB Tracker].[Discipline]="PRB" as part of an aggregate function.
Any ideas to help me with this?
SQL Code:
Code:
SELECT [Overall PRB Tracker].Provider, [Overall PRB Tracker].Status, Count([Overall PRB Tracker].Status) AS CountOfStatus
FROM [Overall PRB Tracker]
GROUP BY [Overall PRB Tracker].Provider, [Overall PRB Tracker].Status
HAVING ((([Overall PRB Tracker].Provider) Like "KGF*" And [Overall PRB Tracker].[Discipline]<>"PRB"));
I get the an error saying: "You tried to execute a query that does not include the specified expression '[Overall PRB Tracker].Provider Like "KGF*" And Not [Overall PRB Tracker].[Discipline]="PRB" as part of an aggregate function.
Any ideas to help me with this?