Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange rounding
Message
De
13/04/2012 08:59:45
 
 
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:
01541375
Vues:
17
>>>>>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

Thanks Naomi,

I never use these data types in my solutions so was unaware of the problems. In this case I'm modifying a system written by someone else who used these types everywhere.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform