A
Ann Scharpf
I am creating my first database. I read through some postings and I THINK a
nested query would fix this problem but I'm not sure ... and, if it IS the
fix, I am not sure of the right syntax to use.
I have a query that is calculating overtime totals for employee time
postings. I have TWO overtime codes (OS & OU). Right now, I am getting TWO
overtime totals per employee. I would like the query to give me a per
employee grand total of the time for both codes.
Here is the SQL view of my query:
SELECT [Study Personnel, Study Tasks].Name, Sum([Study Personnel, Study
Tasks].TotalHours) AS [SumOfTotal Hours],
Sum([TotalHours]*[CivilianOvertimeRate]) AS OvertimeCost INTO [Study Overtime
Cost]
FROM [Study Personnel, Study Tasks], [Standard Variables]
GROUP BY [Study Personnel, Study Tasks].Name, [Study Personnel, Study
Tasks].[Hour Type Code]
HAVING ((([Study Personnel, Study Tasks].[Hour Type Code])="os" Or ([Study
Personnel, Study Tasks].[Hour Type Code])="ou"));
Thanks for any help you can give me.
nested query would fix this problem but I'm not sure ... and, if it IS the
fix, I am not sure of the right syntax to use.
I have a query that is calculating overtime totals for employee time
postings. I have TWO overtime codes (OS & OU). Right now, I am getting TWO
overtime totals per employee. I would like the query to give me a per
employee grand total of the time for both codes.
Here is the SQL view of my query:
SELECT [Study Personnel, Study Tasks].Name, Sum([Study Personnel, Study
Tasks].TotalHours) AS [SumOfTotal Hours],
Sum([TotalHours]*[CivilianOvertimeRate]) AS OvertimeCost INTO [Study Overtime
Cost]
FROM [Study Personnel, Study Tasks], [Standard Variables]
GROUP BY [Study Personnel, Study Tasks].Name, [Study Personnel, Study
Tasks].[Hour Type Code]
HAVING ((([Study Personnel, Study Tasks].[Hour Type Code])="os" Or ([Study
Personnel, Study Tasks].[Hour Type Code])="ou"));
Thanks for any help you can give me.