Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Problem with a float field
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00714875
Message ID:
00714964
Vues:
16
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform