jazminecat
Programmer
I have a query that should be making sums
SELECT DISTINCTROW ElectedOfficialsImportedData.[Emp #], ElectedOfficialsImportedData.Name, ElectedOfficialsImportedData.[Union Group], ElectedOfficialsImportedData.Range, ElectedOfficialsImportedData.Step, ElectedOfficialsImportedData.PayType, ElectedOfficialsImportedData.WeekDate, ElectedOfficialsImportedData.PPED, Sum(ElectedOfficialsImportedData.HoursWorked) AS [Sum Of HoursWorked], Sum(ElectedOfficialsImportedData.GrossPay) AS [Sum Of GrossPay], Count(*) AS [Count Of ElectedOfficialsImportedData]
FROM ElectedOfficialsImportedData
GROUP BY ElectedOfficialsImportedData.[Emp #], ElectedOfficialsImportedData.Name, ElectedOfficialsImportedData.[Union Group], ElectedOfficialsImportedData.Range, ElectedOfficialsImportedData.Step, ElectedOfficialsImportedData.PayType, ElectedOfficialsImportedData.WeekDate, ElectedOfficialsImportedData.PPED
ORDER BY ElectedOfficialsImportedData.Name, ElectedOfficialsImportedData.PPED;
It's not. I want it to total the hous and pay for each person for the PPED. So that the PPED only shows up once, even though in that pped there are 8 pays. so for pped 1/1/05, there may be 4 different types of hours but it will add those, and add the Pay.
SELECT DISTINCTROW ElectedOfficialsImportedData.[Emp #], ElectedOfficialsImportedData.Name, ElectedOfficialsImportedData.[Union Group], ElectedOfficialsImportedData.Range, ElectedOfficialsImportedData.Step, ElectedOfficialsImportedData.PayType, ElectedOfficialsImportedData.WeekDate, ElectedOfficialsImportedData.PPED, Sum(ElectedOfficialsImportedData.HoursWorked) AS [Sum Of HoursWorked], Sum(ElectedOfficialsImportedData.GrossPay) AS [Sum Of GrossPay], Count(*) AS [Count Of ElectedOfficialsImportedData]
FROM ElectedOfficialsImportedData
GROUP BY ElectedOfficialsImportedData.[Emp #], ElectedOfficialsImportedData.Name, ElectedOfficialsImportedData.[Union Group], ElectedOfficialsImportedData.Range, ElectedOfficialsImportedData.Step, ElectedOfficialsImportedData.PayType, ElectedOfficialsImportedData.WeekDate, ElectedOfficialsImportedData.PPED
ORDER BY ElectedOfficialsImportedData.Name, ElectedOfficialsImportedData.PPED;
It's not. I want it to total the hous and pay for each person for the PPED. So that the PPED only shows up once, even though in that pped there are 8 pays. so for pped 1/1/05, there may be 4 different types of hours but it will add those, and add the Pay.