Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange rounding
Message
 
 
À
12/04/2012 15:51:02
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01541246
Message ID:
01541266
Vues:
19
>>>>What are the types of these columns?
>>>
>>>Thanks I solved it. The types were float and money. Casting to numeric fixes it.
>>
>>Exactly. That was my first thought - that both or one of them is float.
>
>This rounding has been working for a couple of months now, is it that float only causes problems in certain situations?

Every data type in SQL Server has certain problems. But float and money are the types that lead to the most number of rounding errors.

Search MSDN forum for Money vs. Decimal discussions, say,
http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/f24acf6c-a518-4f0a-a13e-0172e700564c
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform