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.
select nvarchar20 Category, case when count(tp_id)/12 > 0 then convert(decimal(10,2),(count(tp_id)/12)) else 0 end AVG
For the first row (111 rows/12), the results show as 9.00, but the actual # should be 9.25...so the conversion is just adding ".00" to the int value of 9. How do I get it to show the actualy decimal value 9.25?