VistaDB 5
ISNULL( ColumnToTest, ReplacementIfNull )

ISNULL tests the ColumnToTest for a NULL value. If the database entry is NULL it will be replaced with the ReplacementIfNull value. The return value is implicitly converted to the ColumnToTest value type if they types differ.


This would replace any NULL values in the table with 0 for the AVG calculation.
SELECT AVG( ISNULL(AColumn, 0)) FROM aTable;

See Also