Click here to Skip to main content
15,860,972 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a procedure that working fine from last five month. but now in one case the round function cannot round the figure see below:

declare @per float;
select @per=1.39
select round(((11250+0)*@per),0)

it giveing 15637 instead of 15638

15637.5= 15638

sqlserver
Posted

1 solution

Hi
convert it to decimal


SQL
declare @per float;
select @per=1.39
select CONVERT(decimal(18,3),round(((11250+0)*convert(decimal(18,3),@per)),0))




Regards
Sanju
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900