lundi 29 juin 2015

SQLite Math Problems

ROUND(SUM(price)-(SUM(price*TAX/100.0)+SUM(purchaseprice)),2) as profit = i get 227.8 as Profit

When i calculate them by my self i get 227.81 as Profit.

ROUND(SUM(price)-(SUM(price*TAX/100.0)+SUM(purchaseprice)),2)  as profit...GROUP BY productname (how i calculate it one by one i get the sum of 227.81)

Does SQLite have Problems calculating and Rounding floating points? I have already tried to change the type to numeric, real .... Maybe i can do the Math differently any ideas?

Aucun commentaire:

Enregistrer un commentaire