Sorry for the nube question. I have two tables. One for employee profiles and one for employee performance stats. Each employee's performance is rated on the group they are in. In this case thier productivity type or EmpProdType in the profile table.
Im writing a query for a report that shows the date, employee name, calls in, calls out, tickets opened, Tickets closed, and the productivity from the performance table.
In the report, I need to group the employees by EmpProdType(group) and sort by productivity, decending.
FROM Emp_Stats_Daily INNER JOIN Emp_Profile ON Emp_Stats_Daily.EmpID = Emp_Profile.EmpID
WHERE (((Emp_Stats_Daily.[Perf_Daily_Date])=(Select ParamValue from ParamTable where ParamName = "SelectedDate")))
GROUP BY Emp_Profile.EmpProdType
ORDER BY Emp_Stats_Daily.[Perf_Daily_Prod] DESC;
When I run this I get an error saying:
"You tried to execute a query that does not include 'Perf_Daily_Date' as part of an aggrogate function"
When I add it to the GROUP BY, it says the same thing for Perf_Daily_Name.
What am I doing wrong??
P.S. The ParamTable is an unfortunate result of using C# Express and MS Access for reporting.