Hi Gents,I have a problem, I try to retrieve the sum of the result of a function with parameters within select here is my query :select userid,C.CategoryName ,(select SUM([CalculateHours](TD.StartTime , TD.StopTime)) from [CalculateHours](TD.StartTime , TD.StopTime)) as 'aantaluren' from Table1 as TDjoin Table2 as TC on TD.ID = TC.Table1ID join Table3 as C on TC.Table3ID = C.ID where 'condition 1' and 'condition 2'group by userid,C.CategoryName
If i'm wrong please don't hesitate to correct meCalculateHours is a function who gets 2 parameters start- and stoptime and returns only workinghours.Thanks a lot for your help/suggestions.Hicham.