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 |
|
smagaz
2 Posts |
Posted - 2001-07-12 : 11:49:43
|
| I am really new in sql and this is my problem:I would like to retrieve information from a database called DBThe table is TimeSheet with the following fields:ProjectCode , Hours , StatusProjectCode=name of the projectHours= nbr of hours spent for this projectStatus=ToBill,Billed,PaidTimeSheet table contains several entries for each Project with different Hours and statusExampleProjectA , 15 , To BillProjectB , 10 , PaidProjectA , 7 , BilledProjectA , 4 , ToBillProjectB , 8 , BilledProjectB ,3 , PaidI need a list with:ProjectCode , Total of Hours To Bill , Total of Hours Billed , Grand Total of Hours PaidExample:ProjectA , 19, 7 , 0ProjectB , 0 ,8 , 13How can I achieve that with a sql query ?Thanks for your helpSalva |
|
|
|
|
|
|
|