Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi,I am trying to use round here.Below script output is 13.77777. but I need 13.7Can you help me to ROUND Select avg(isnull(TotalMessages,0)) as TotalAvgMessagesPerPatient from #temp_patientsTotalMessages DECIMAL (datatype)
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts
Posted - 2011-08-04 : 14:16:32
I assume you want to "round down" or truncate to one decimal place.
Select round(avg(isnull(TotalMessages,0)),1,1) as TotalAvgMessagesPerPatientfrom #temp_patients