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 |
zokhox
Starting Member
4 Posts |
Posted - 2012-06-27 : 20:03:12
|
HiI have 3 tables as: Worker (WorkerID, WorkerName), WorkOnProject (ProjectID, WorkerID, NumberDays)AbsentOnProject (ProjectID, WorkerID, AbsentDays) "AbsentDays is a negative number"I need to write a query which shows WorkerID, WorkerName and a column which shows the result of (NumberDays + AbsentDays) for each worker.Please note that there could be multiple Absent records for each worker in the AbsentOnProject table. So I think I should Sum AbsentDays for each worker first then add the result to NumberDays in the WorkOnProject |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
|
|
|