question

omprakashsah avatar image
omprakashsah asked

sql Query for duration

Please help for sum of total Duration -: **Duration Status** 00:10:32 ON 00:09:37 ON 00:13:40 ON 00:16:26 ON 00:14:42 ON 00:20:21 ON 00:32:05 ON ------------------- Total
sql query
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev Riley avatar image Kev Riley ♦♦ commented ·
What datatype is your Duration stored as?
0 Likes 0 ·
Squirrel avatar image
Squirrel answered
select convert(time, dateadd(second, sum(datediff(second, 0, convert(time, duration))), 0)) from yourtable
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ecomma avatar image
ecomma answered
Please script your table and paste it here. It will be much easier the know the cause of the slowness
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Squirrel avatar image Squirrel commented ·
what "cause of the slowness" ?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.