Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange rounding
Message
 
 
To
12/04/2012 14:58:20
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01541246
Message ID:
01541253
Views:
30
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform