B
Bob Groger
Hello,
I have a Timesheet application for figuring payroll. I need to calculate
overtime hours on a report. I have a Query that returns all the information
except the calculated information.
SQL for Query is:
SELECT Timesheet.Driver_ID, Employees.[Last Name], Employees.[First Name],
Timesheet.Terminal_ID, Timesheet.Date, Timesheet.Total_Paid_Time,
Timesheet.Training_Inst, Timesheet.Training_Stud, Timesheet.OP_VAC,
Timesheet.OP_HOL, Timesheet.OP_Other, Timesheet.OP_Reason,
Employees.Payroll_Company
FROM Employees LEFT JOIN Timesheet ON Employees.Empl_ID =
Timesheet.Driver_ID
WHERE (((Timesheet.Date) Between #12/4/2005# And #12/17/2005#) AND
((Employees.Payroll_Company)="RP"))
ORDER BY Timesheet.Driver_ID, Timesheet.Date;
I have a report based on this query grouped by driver and date by week.
Total_Paid_Hours includes Vacation, Holiday, and Other hours. I need to
calculate Overtime Pay per week in a text box as [Total_Paid_Time] -
[OP_Vac] - [OP_HOL] -[OP_Other] -40 but only if a positive number. I am no
math or syntax guru, and all attempts at this have returned inconsistent or
plain wrong results.
Can someone suggest the correct syntax to do this, or do I need to do the
calculations in the query?
Thanks,
Bob Groger
I have a Timesheet application for figuring payroll. I need to calculate
overtime hours on a report. I have a Query that returns all the information
except the calculated information.
SQL for Query is:
SELECT Timesheet.Driver_ID, Employees.[Last Name], Employees.[First Name],
Timesheet.Terminal_ID, Timesheet.Date, Timesheet.Total_Paid_Time,
Timesheet.Training_Inst, Timesheet.Training_Stud, Timesheet.OP_VAC,
Timesheet.OP_HOL, Timesheet.OP_Other, Timesheet.OP_Reason,
Employees.Payroll_Company
FROM Employees LEFT JOIN Timesheet ON Employees.Empl_ID =
Timesheet.Driver_ID
WHERE (((Timesheet.Date) Between #12/4/2005# And #12/17/2005#) AND
((Employees.Payroll_Company)="RP"))
ORDER BY Timesheet.Driver_ID, Timesheet.Date;
I have a report based on this query grouped by driver and date by week.
Total_Paid_Hours includes Vacation, Holiday, and Other hours. I need to
calculate Overtime Pay per week in a text box as [Total_Paid_Time] -
[OP_Vac] - [OP_HOL] -[OP_Other] -40 but only if a positive number. I am no
math or syntax guru, and all attempts at this have returned inconsistent or
plain wrong results.
Can someone suggest the correct syntax to do this, or do I need to do the
calculations in the query?
Thanks,
Bob Groger