Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## IFNULL

> Returns `value` if `expr` is `NULL`. If `expr` is not `NULL`, `IFNULL` returns `expr`.

> #### Syntax

>     IFNULL( expr, value)

> Example

> In this example, which illustrates the `IFNULL` function, the `SELECT` statement returns three rows with a `NULL` value in column `C1`, and two non-`NULL` values:

>     SELECT C1, IFNULL(C1, 9999) FROM TEMP ORDER BY C1;

>     C1    IFNULL(C1,9999)
>     --    ----------------
>           9999
>           9999
>           9999
>     1     1
>     3     3

> #### Note

> - The data type of `value` must be compatible with the data type of `expr`.

> ##### Compatibility

> ODBC compatible

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095