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 |
|
krishnasv
Starting Member
1 Post |
Posted - 2007-03-12 : 06:07:44
|
| Can any one help me to solve this query.I am provided with a table with fields,Emap IdEmp NameDateTime inTime OutI need to calculate the total hours an employee worked in a week. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-12 : 07:51:20
|
| select [emp id], datepart(wk, date), sum(datediff(second, [time in], [time out])) / 3600.0from table1group by [emp id], datepart(wk, date)Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|