Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Rounding issue RE: Rounding issue
Lynn Pettis
SSC Guru
Points: 442467
More actions
March 1, 2018 at 10:59 am
#1981681
PSB - Thursday, March 1, 2018 10:55 AMSELECT 10103,11828,ROUND(10103/11828,0) As results -- Results coming in as 0.
SELECT 10103,11828,ROUND(10103/11828,0) As results
-- Results coming in as 0.
You are doing integer math, that is why you are getting 0. Add a .0 to one of the numbers.