Query returns -4.61852778244065E-14 for a number field calculation
Posted on 2014-01-29
I have an invoice table containing a number invoice lines, each with with 3 fields, Debit, Credit, and Amount. All doubles to 2 dec places.
Amount is positive for Debits and negative for Credits. The Invoice looks perfectly normal in the Invoice table. All values to 2 decimal places.
I have query which groups the transactions by invoice and sums the Amount which should be zero.
However, the query sometimes returns a Sum of Amount such as -4.61852778244065E-14, which makes the invoice out of balance.
Can anyone tell me how to fix this?
Thanks in advance.