Many people on this forum would advise you to store time as TIME or DATETIME data types. However, sometimes, you have to work with what you have, so here is an example of how I would do it.CREATE TABLE #tmp(val DECIMAL(9,2));INSERT INTO #tmp VALUES (1.45),(1.3),(1.25);WITH A AS ( SELECT SUM(DATEPART( HOUR, CAST(REPLACE(val,'.',':') AS DATETIME)) ) * 60 + SUM(DATEPART( MINUTE, CAST(REPLACE(val,'.',':') AS DATETIME) ) ) TotalMinutes FROM #tmp)SELECT TotalMinutes/60 + TotalMinutes%60/100. FROM A;DROP TABLE #tmp;
If you are on SQL 2008, TIME datatype instead of DATETIME datatype can be used.It may be easier to do this with simple floats and floors and modulos. But there is something intangible that I like about using date/time data types when working with date and time, that is why I used this approach.