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
Use NVL(В ) to remove null values from calculations or operations where null values are not supported or are not relevant.
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. |