I have a query like
SELECT
some_field,
SUM(float_field)
FROM
some_table
GROUP BY
some_field
HAVING
SUM(float_field) <> 0
Is it safe to use such way of comparison in Oracle or it is better to use something like
ABS(SUM(float_field)) < PrecisionConstant
Just for case, float_field is not nullable field of FLOAT type
Well, the expression
HAVING SUM(float_field) <> 0will not restrict records where the SUM would be like 0.1 or -0.2.Use the following expression if you want to achieve that: