Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Rokasra
Starting Member
2 Posts |
Posted - 2014-07-17 : 09:59:16
|
Hi guys,I need some help for one query. I would like to show employee work hours daily from monday to Sunday. I have managed to write a query to get the total hours. This is the query giving total hours from and to date.(select sum(t.timespent)/60 from timeitems t where t.employee = e.code and t.project = p.code and t.ndate >= '2014-07-15' AND t.ndate <= '2014-07-15') as Hoursfrom projemplink plThank you in advance |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2014-07-17 : 13:41:11
|
[code] ( SELECT SUM(t.TimeSpent) / 60E FROM dbo.TimeItems AS t WHERE t.Employee = e.Code AND t.Project = p.Code AND t.nDate >= '20140715' AND t.nDate < '20140716' ) AS [Hours]from dbo.ProjEmpLink AS pl[/code] Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA |
|
|
|
|
|