Icon View Incident Report

Minor Minor
Reported By: Tim Johnson
Reported On: 12/28/2004
For: Version 4.15 Build 1
# 1931 SQL COUNT() Aggregate Function Not Returning Correct Result When There are No Candidate Rows

Found a problem with the Count() function. The following query returns null as its result.

Select Count(MY_Field_ID) from SomeTable where MY_Field_ID < 0



Comments Comments and Workarounds
The workaround is to use the COALESCE or IFNULL function to convert any NULLs into 0 values.


Resolution Resolution
Fixed Problem on 12/28/2004 in version 4.16 build 1
Image