I am trying to get the following to work, but it seems that once any single aggregate function gets introduced into a query, then suddenly the query wants ALL of the SELECTed expressions to be in an aggregate function -- and not all of them are able to be 'aggregated', i.e. text:
For example:
SELECT LastFirstQuery.division AS Division,
count(newEmpTrainQuery.Emp
loyeeID) AS EmpNum,
count(newEmpTrainQuery.Tra
iningID) AS CourseNum,
newEmpTrainQuery.[Course Category] AS Category
FROM newEmpTrainQuery, LastFirstQuery
WHERE (((LastFirstQuery.id)=newE
mpTrainQue
ry.Employe
eID))
GROUP BY Division;
I will be using this query to generate a report that presents the results of the query with Division as the primary grouping, and Category as the secondary grouping, with totals under each category (EmpNum, and CourseNum).
The error I get tells me that I need to use 'category' in an aggregate function, but frankly I have no need to add, multiply, divide, or average my Category data -- it's text. What do I do to avoid this error?
(Full error, as you well know: "You tried to execute a query that dones not include the specified expression 'Category' as part of an aggregate function.")
Start Free Trial