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 |
jkimpson
Starting Member
4 Posts |
Posted - 2007-12-13 : 14:12:27
|
I have a report that needs to calculate the TOTAL_DAYS_WORKED based off of 3 different start and end date columns. The DateDiff function is working correctly but I am now having trouble getting the TOTAL_DAYS_WORKED for each.Project Example Below:NOTES_DURATION = 4LAN_DURATION = 3PC_DURATION = 1TOTAL_DAYS_WORKED = ? - This is what I need to calculateAny ideas on how to do this?Thx,Joyce |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-12-13 : 15:19:49
|
[code]select TOTAL_DURATION=NOTES_DURATION+LAN_DURATION+PC_DURATIONfrom MyTable[/code]CODO ERGO SUM |
|
|
jkimpson
Starting Member
4 Posts |
Posted - 2007-12-14 : 09:10:33
|
Thx MichaelThat worked. It took me leaving my query to come back and think of that.You Rock!!!!:o)Joycequote: Originally posted by Michael Valentine Jones
select TOTAL_DURATION=NOTES_DURATION+LAN_DURATION+PC_DURATIONfrom MyTable CODO ERGO SUM
|
|
|
|
|
|