C
cwh2724 via AccessMonster.com
I am relatively new to Access and have gotten many answers from reading the
existing threads. I have not seen one problem specifically answered. I am
using Access 97.
I am generating a report of Employees and Errors with a count for each type
of Error. Here is the SQL that I am currently using to generate the report:
SELECT Employee, Error, Count(Error) as TotalErrors
FROM tbltmpUM
GROUP BY Employee, Error;
However, I need to sort the report descending by the total number of Errors
for each Employee. From what I have read I need to join a query to the one
above that is calculating the total number for the employee, maybe something
like
SELECT Employee, Count(*) as EmpCnt
FROM tbltmpUM
GROUP BY Employee;
I just can't figure out how to join the 2 since they both have a GROUP BY in
them. Do I need to create a temporary table in the new SELECT and then join
it to the other one?
Thanks in advance for any assistance that you can provide. This is an
awesome website!
existing threads. I have not seen one problem specifically answered. I am
using Access 97.
I am generating a report of Employees and Errors with a count for each type
of Error. Here is the SQL that I am currently using to generate the report:
SELECT Employee, Error, Count(Error) as TotalErrors
FROM tbltmpUM
GROUP BY Employee, Error;
However, I need to sort the report descending by the total number of Errors
for each Employee. From what I have read I need to join a query to the one
above that is calculating the total number for the employee, maybe something
like
SELECT Employee, Count(*) as EmpCnt
FROM tbltmpUM
GROUP BY Employee;
I just can't figure out how to join the 2 since they both have a GROUP BY in
them. Do I need to create a temporary table in the new SELECT and then join
it to the other one?
Thanks in advance for any assistance that you can provide. This is an
awesome website!