D
Duncan Edment
I'm trying to write a query that will retrieve records for a specified date
or date period, and show all the time worked by all employees on all
projects, in that time frame. So far, I have a query as follows:
SELECT tblProjects.fldProjectDescription, tblEmployee.fldEmployeeName,
tblTimeSheet.fldDateWorked, tblTimeSheet.fldStartTime,
tblTimeSheet.fldEndTime, Sum([fldEndTime]-[fldStartTime]) AS
ProjectDuration, tblTimeSheet.fldEmployeeID, tblTimeSheet.fldProjectID
FROM tblProjects INNER JOIN (tblEmployee INNER JOIN tblTimeSheet ON
tblEmployee.fldEmployeeID = tblTimeSheet.fldEmployeeID) ON
tblProjects.fldProjectID = tblTimeSheet.fldProjectID
WHERE (((tblTimeSheet.fldDateWorked) Between [StartDate] And [EndDate]))
GROUP BY tblProjects.fldProjectDescription, tblEmployee.fldEmployeeName,
tblTimeSheet.fldDateWorked, tblTimeSheet.fldStartTime,
tblTimeSheet.fldEndTime, tblTimeSheet.fldEmployeeID,
tblTimeSheet.fldProjectID
ORDER BY tblProjects.fldProjectDescription, tblEmployee.fldEmployeeName;
However, this retrieves multiple 'ProjectDuration' values for each employee.
What I want it to do, is provide me with a sum of the 'ProjectDuration'
values for each project and employee. Make sense?
Also, what is the best way to display this information? I tried looking at
a Crosstab & a PivotTable however, possibly since my query is not right,
both looked cluttered and were more of a hindrance than anything else. I'd
appreciate your input.
Thanks & regards
Duncan
--
Newsgroups are like one big sandbox that all of us
UseNet kiddies play in with peace & harmony.
Spammers, Cross-Posters, and Lamers are the
people that pee in our big sandbox.
or date period, and show all the time worked by all employees on all
projects, in that time frame. So far, I have a query as follows:
SELECT tblProjects.fldProjectDescription, tblEmployee.fldEmployeeName,
tblTimeSheet.fldDateWorked, tblTimeSheet.fldStartTime,
tblTimeSheet.fldEndTime, Sum([fldEndTime]-[fldStartTime]) AS
ProjectDuration, tblTimeSheet.fldEmployeeID, tblTimeSheet.fldProjectID
FROM tblProjects INNER JOIN (tblEmployee INNER JOIN tblTimeSheet ON
tblEmployee.fldEmployeeID = tblTimeSheet.fldEmployeeID) ON
tblProjects.fldProjectID = tblTimeSheet.fldProjectID
WHERE (((tblTimeSheet.fldDateWorked) Between [StartDate] And [EndDate]))
GROUP BY tblProjects.fldProjectDescription, tblEmployee.fldEmployeeName,
tblTimeSheet.fldDateWorked, tblTimeSheet.fldStartTime,
tblTimeSheet.fldEndTime, tblTimeSheet.fldEmployeeID,
tblTimeSheet.fldProjectID
ORDER BY tblProjects.fldProjectDescription, tblEmployee.fldEmployeeName;
However, this retrieves multiple 'ProjectDuration' values for each employee.
What I want it to do, is provide me with a sum of the 'ProjectDuration'
values for each project and employee. Make sense?
Also, what is the best way to display this information? I tried looking at
a Crosstab & a PivotTable however, possibly since my query is not right,
both looked cluttered and were more of a hindrance than anything else. I'd
appreciate your input.
Thanks & regards
Duncan
--
Newsgroups are like one big sandbox that all of us
UseNet kiddies play in with peace & harmony.
Spammers, Cross-Posters, and Lamers are the
people that pee in our big sandbox.