Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A Problem with a float field
Message
 
To
24/10/2002 10:44:30
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00714875
Message ID:
00714964
Views:
15
This message has been marked as the solution to the initial question of the thread.
>I´m using SQL 2000 and a table have a field type FLOAT, size: 8, precision: 53.
>
>when I insert an INT, like: 55 I don´t have problems, but if I insert 55.1 then the value of my field shows 55.10000000000001
>
>other: if I insert 55.51 it returns: 55.50999999999999
>
>What´s wrong ?

Hi, Frederico
Nothing's wrong. That's just the nearest floating representation of your original number. I you don't like it displayed like that, you can either apply ROUND() to your float value, or use a DECIMAL type instead of a float

Regards,
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Previous
Reply
Map
View

Click here to load this message in the networking platform