Thursday, 15 July 2010

sql server - ROUND() givin incorrect result in sql -



sql server - ROUND() givin incorrect result in sql -

select round(849299099755.3,2) dual;

gives

849299099755.3

how can 849299099755.30 here???

convert datatype onto decimal

select convert(decimal(15,2), round(849299099755.3,2))

or

select str(round(849299099755.3,2), 20, 2)

sql-server oracle tsql rounding

No comments:

Post a Comment