Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nikoo56
Starting Member
26 Posts |
Posted - 2012-03-14 : 19:08:14
|
I have this query that shows total response in time format hours:minlike 5:60in the report I like to show Average for each team. I am not sure how to write an expression.select ltrim((total_response)/60) +':' + REPLACE( SPACE(CASE WHEN (total_response)%60< 10 THEN 1 ELSE 0 END), ' ', '0') + LTRIM((total_response)%60) AS total_responsefrom viewThanks, |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-03-15 : 15:58:34
|
[code]select team,convert(varchar(8),dateadd(minute,avg(datediff(minute,0,total_response)*1.0),0),108)from viewgroup by team[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|