2 floating numbers substract in a query
Posted: Sun May 15, 2005 12:13 am
have this query :
in the first result i get instead of 92 i get : 91.199996948242
what can i do to prevent this? and get the correct answer?
by the way in the first line i am adding 2 number : 45.5 and 46.5=92
so whats the solution
tnaks in advance
peleg
Code: Select all
SELECT costumers.id as cID,sum(users_payment .total_bill-actuall_payed)
from costumers
LEFT JOIN users_payment ON users_payment.userid=costumers.id AND users_payment.month<5
group by cID
LIMIT 0, 50in the first result i get instead of 92 i get : 91.199996948242
what can i do to prevent this? and get the correct answer?
by the way in the first line i am adding 2 number : 45.5 and 46.5=92
so whats the solution
tnaks in advance
peleg