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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 round function over real type return wrong values (SQL Server 7.0)

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-29 : 22:40:37
MAURO writes "When I submit this query on SQL Server 7.0 I obtain unexpected results:

select round(convert(real, 14.3),2)
it returns:
-----------------------------------------------------
14.300000000000001

(1 row(s) affected)

The problem can be generalized in what when I try to assign number values (with decimal values) to a real type column table I obtain anexpected results. Have you a logical answare for this strange results?

I ask your pardon for my little(wrong) english.

ThanK you for your attention.
Mauro Lubino, Italy."
   

- Advertisement -