Código SQL:
Ver originalCREATE TABLE #temp
(
campo1 VARCHAR(20),
campo2 TIME--varchar(20)
)
INSERT INTO #temp VALUES ('S_YOMBLON','08:25:15')
INSERT INTO #temp VALUES ('S_YOMBLON','07:58:30')
INSERT INTO #temp VALUES ('S_YOMBLON','07:55:00')
INSERT INTO #temp VALUES ('S_YOMBLON','07:45:25')
INSERT INTO #temp VALUES ('S_YOMBLON','07:34:50')
INSERT INTO #temp VALUES ('S_YOMBLON','07:24:30')
INSERT INTO #temp VALUES ('S_YOMBLON','08:09:45')
INSERT INTO #temp VALUES ('S_YOMBLON','07:29:38')
INSERT INTO #temp VALUES ('S_YOMBLON','08:50:20')
INSERT INTO #temp VALUES ('S_YOMBLON','08:26:40')
INSERT INTO #temp VALUES ('S_YOMBLON','10:00:43')
INSERT INTO #temp VALUES ('S_YOMBLON','09:50:50')
INSERT INTO #temp VALUES ('S_YOMBLON','08:12:35')
INSERT INTO #temp VALUES ('S_YOMBLON','07:54:17')
INSERT INTO #temp VALUES ('S_YOMBLON','07:55:50')
INSERT INTO #temp VALUES ('S_YOMBLON','07:43:00')
INSERT INTO #temp VALUES ('S_YOMBLON','00:04:55')
INSERT INTO #temp VALUES ('S_YOMBLON','09:16:25')
INSERT INTO #temp VALUES ('S_YOMBLON','08:49:35')
INSERT INTO #temp VALUES ('S_YOMBLON','09:13:43')
INSERT INTO #temp VALUES ('S_YOMBLON','08:12:15')
INSERT INTO #temp VALUES ('S_YOMBLON','08:10:35')
INSERT INTO #temp VALUES ('S_YOMBLON','09:44:37')
INSERT INTO #temp VALUES ('S_YOMBLON','08:24:15')
INSERT INTO #temp VALUES ('S_YOMBLON','01:16:55')
INSERT INTO #temp VALUES ('S_YOMBLON','07:43:25')
INSERT INTO #temp VALUES ('S_YOMBLON','07:56:28')
INSERT INTO #temp VALUES ('S_YOMBLON','07:41:30')
INSERT INTO #temp VALUES ('S_YOMBLON','07:10:15')
INSERT INTO #temp VALUES ('S_YOMBLON','07:12:45')
INSERT INTO #temp VALUES ('S_YOMBLON','08:14:55')
INSERT INTO #temp VALUES ('S_YOMBLON','07:31:58')
SELECT CAST(HVal AS VARCHAR(10))+':'+RIGHT(MVal+100, 2)+':'+RIGHT(SVal+100, 2)
FROM
(
SELECT H.Val AS hval, M.Val AS mval, S.Val AS sval
FROM (
--Your query goes here
SELECT dateadd(SECOND, SUM(datediff(SECOND, 0, campo2)), 0) AS sumtime
FROM #temp
) AS T
CROSS apply (SELECT datedifF(HOUR, 0, T.sumTime)) AS H(Val)
CROSS apply (SELECT datediff(MINUTE, 0, dateadd(HOUR, -H.Val, T.sumTime))) AS M(Val)
CROSS apply (SELECT datediff(SECOND, 0, dateadd(HOUR, -H.Val, dateadd(MINUTE, -M.Val, T.sumTime)))) AS S(Val)
) AS t1
este da otro aproach