I’m trying to do a round in sql but the result is very strange; here is what i do :
I’m using Mssql
I have a select :
Select num1, num2, num1 * num2, round(num1 * num2, 2)
from myTable
Datatype :
num1 is a float
num2 is a money
if the value of num1 is 15
and the value of num2 is 0.033
Here is my resultset :
15, 0.033, 0.495, 0.5
The problem is when I have those values :
if the value of num1 is 5
and the value of num2 is 0.045
Here is my resultset :
5, 0.045, 0.225, 0.22
Someone have an idea?
I’ve converted my float column to money and it’s seems to be working now.
Thanks all of you !