Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange rounding
Message
 
 
À
12/04/2012 14:58:20
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:
01541253
Vues:
31
>Hi,
>
>I have this query:
>
>
select Cases.Fee
>		,ApplicationCodes.TaxRate
>		,newcalc = round(cases.Fee * ApplicationCodes.TaxRate, 2)
>	from Cases 
>	left outer join ApplicationCodes on 1=1
>where ID = 2367
>
>In this case Fee = 2971.50 and Taxrate = 0.15
>
>so by my math newcalc = 2971.50 * 0.15 = 445.725
>
>which when rounded to 2 decimal places I should get 445.73
>
>Why would SQL Server be returning 445.72?

What are the types of these columns?
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