Returns a non-null value from two expressions.
|
|---|
NVL(eExpression1, eExpression2) |
Parameters
-
eExpression1, eExpression2
-
NVL( ) returns eExpression2 if eExpression1 evaluates to a null value. NVL( ) returns eExpression1 if eExpression1 is not a null value. eExpression1 and eExpression2 may be any data type. NVL( ) returns .NULL. if both eExpression1 and eExpression2 both evaluate to the null value.
Return Value
Character, Date, DateTime, Numeric, Currency, Logical, or the null value
Remarks
Example
The following example creates a memory variable named glMyNull that contains the null value. NVL( ) is used to return a non-null value from glMyNull and another expression.
| | Copy Code |
|---|
STORE .NULL. TO glMyNull && A memory variable containing the null value
CLEAR
? NVL(.T., glMyNull) && Displays .T.
? NVL(glMyNull, glMyNull) && Displays .NULL. |
See Also