ISNULL function
This function is used to replaces a NULL value with another value.
Function parameters:
The first parameter is an expression of any type
The second parameter is an expression of any type
The first parameter value is returned if this parameter is not NULL; otherwise, the second parameter value is returned.
The second parameter is converted to the type of the first parameter if the type of the first parameter is String or Number.
Example:
// Obtain sum based on Quantity field. If no record
// exists, display 0
SELECT ISNULL(SUM(Quantity), 0) AS Quantity
FROM Document.ExpInvoice.Contents
See also: Functions of Query Language