![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi Could anyone help me out with a calculated member problem ? If the folowing is the Data in the SQL Server ------------------------------------ SL Location Testdate Offerdate ------------------------------------ 1 K1 1/3/2003 1/6/2003 2 K1 2/3/2003 2/4/2003 3 K2 2/3/2003 2/10/2003 4 K2 3/20/2003 3/25/2003 I need to find the Average of the difference of the 2 dates for each location (K1 and K2) ie. avg(DATEDIFF (d,Testdate,Offerdate)) . I know there is an AVG and Datediff function , but how do i use them in conjunction . could you give me the exact syntax as i'm kinda new to this. I want the result to show Loc AVG ---------------- K1 2 (3 days + 1 day = 4/2 = 2) K2 6 (7 days + 5 days = 12/2 = 6) thnks -- Dev Noronha Posted via http://dbforums.com |
#2
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |