O
obriend
Here is my SQL statement
SELECT Sum([TIME WORKED].[HOURS WORKED]) AS [SumOfHOURS WORKED], [TIME
WORKED].DATE, [Employee list].NAME, [Employee list].[SHIFT/SQUAD]
FROM [Employee list] LEFT JOIN [TIME WORKED] ON [Employee list].ID =
[TIME WORKED].ID
GROUP BY [TIME WORKED].DATE, [Employee list].NAME, [Employee list].
[SHIFT/SQUAD]
HAVING ((([TIME WORKED].DATE) Between #1/1/2007# And #1/30/2007#) AND
(([Employee list].[SHIFT/SQUAD]) Like 4 Or ([Employee list].[SHIFT/
SQUAD])=8 Or ([Employee list].[SHIFT/SQUAD])=12 Or ([Employee list].
[SHIFT/SQUAD])=16))
ORDER BY Sum([TIME WORKED].[HOURS WORKED]), [Employee list].NAME;
I was showing all records from the Employee list whether or not they
had worked hours. Now I tried to add a date range and all I get is
what I had before - employees that just worked OT.
Help!
SELECT Sum([TIME WORKED].[HOURS WORKED]) AS [SumOfHOURS WORKED], [TIME
WORKED].DATE, [Employee list].NAME, [Employee list].[SHIFT/SQUAD]
FROM [Employee list] LEFT JOIN [TIME WORKED] ON [Employee list].ID =
[TIME WORKED].ID
GROUP BY [TIME WORKED].DATE, [Employee list].NAME, [Employee list].
[SHIFT/SQUAD]
HAVING ((([TIME WORKED].DATE) Between #1/1/2007# And #1/30/2007#) AND
(([Employee list].[SHIFT/SQUAD]) Like 4 Or ([Employee list].[SHIFT/
SQUAD])=8 Or ([Employee list].[SHIFT/SQUAD])=12 Or ([Employee list].
[SHIFT/SQUAD])=16))
ORDER BY Sum([TIME WORKED].[HOURS WORKED]), [Employee list].NAME;
I was showing all records from the Employee list whether or not they
had worked hours. Now I tried to add a date range and all I get is
what I had before - employees that just worked OT.
Help!