I am facing this issue with the SQL SUM()
function I have three values that have the sum equals to zero as you can see the values but with the SUM()
function the answer is that strange values as shown.
select Qty
from Stock
where ProductCode = '5LINE-15-1-30RU'
Output:
1. 49.72
2. -31.065
3. -18.655
Whereas
select sum(Qty)
from Stock
where ProductCode = '5LINE-15-1-30RU'
Output:
-3.5527136788005E-15
The result have to be 0 but I got this awkward value.
Column Qty
is a float
.
-3.5527136788005E-15
is zero.