N
Nick
I have receive help with SQL that gives totals between a certain period of
time. I would like to know how to get the total prior to the requested time
in the query and also have have quarter to date. I am including the SQL of
the requested time frame.
PARAMETERS Weekendingdate DateTime;
TRANSFORM Max(OvertimeTracking.oTDLhOURUSED) AS MaxOfoTDLhOURUSED
SELECT Employees.SSI, Sum(OvertimeTracking.oTDLhOURUSED) AS [Total Of otdliD]
FROM Employees INNER JOIN OvertimeTracking ON Employees.SSI =
OvertimeTracking.EMPiD
WHERE (((OvertimeTracking.aUTHORIZED) Like 1 Or
(OvertimeTracking.aUTHORIZED) Like 6)) and otdldate
Between DateAdd("d",1-Weekday([Weekendingdate],7),[Weekendingdate])
and DateAdd("d",1-Weekday([Weekendingdate],7),[Weekendingdate])+6
GROUP BY Employees.SSI
PIVOT Format(OTDLDate,"ddd") IN
("Sat", "Sun", "Mon", "Tue","Wed","Thu","Fri");
Thanks for your help.
time. I would like to know how to get the total prior to the requested time
in the query and also have have quarter to date. I am including the SQL of
the requested time frame.
PARAMETERS Weekendingdate DateTime;
TRANSFORM Max(OvertimeTracking.oTDLhOURUSED) AS MaxOfoTDLhOURUSED
SELECT Employees.SSI, Sum(OvertimeTracking.oTDLhOURUSED) AS [Total Of otdliD]
FROM Employees INNER JOIN OvertimeTracking ON Employees.SSI =
OvertimeTracking.EMPiD
WHERE (((OvertimeTracking.aUTHORIZED) Like 1 Or
(OvertimeTracking.aUTHORIZED) Like 6)) and otdldate
Between DateAdd("d",1-Weekday([Weekendingdate],7),[Weekendingdate])
and DateAdd("d",1-Weekday([Weekendingdate],7),[Weekendingdate])+6
GROUP BY Employees.SSI
PIVOT Format(OTDLDate,"ddd") IN
("Sat", "Sun", "Mon", "Tue","Wed","Thu","Fri");
Thanks for your help.