I have the following query:
SELECT DISTINCT
[ScratchPad5].EmployeeNumber ,
SUM( case when [sumhours]>40
THEN 40
ELSE [sumhours]
END ) AS TotalRegHours,
SUM( case when [sumhours]>40
THEN [sumhours]-40
ELSE 0
END ) AS TotalOT
FROM
ScratchPad5
GROUP BY
[ScratchPad5].EmployeeNumber ,
sumhours
what I want to do is when this is ran, to create a timestamp for the field payrolldate and also mark a field payrollran as yes and to mark a field called approved as yes as well. Can someone please assist?
Thank you
SELECT DISTINCT
[ScratchPad5].EmployeeNumber ,
SUM( case when [sumhours]>40
THEN 40
ELSE [sumhours]
END ) AS TotalRegHours,
SUM( case when [sumhours]>40
THEN [sumhours]-40
ELSE 0
END ) AS TotalOT
FROM
ScratchPad5
GROUP BY
[ScratchPad5].EmployeeNumber ,
sumhours
what I want to do is when this is ran, to create a timestamp for the field payrolldate and also mark a field payrollran as yes and to mark a field called approved as yes as well. Can someone please assist?
Thank you
Comment