Skip Headers
Oracle® OLAP DML Reference
11g Release 1 (11.1)

Part Number B28126-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

NVL

The NVL function replaces a NA value or an empty string with a string.

To evaluate a specified expression and replace a non-NA value or empty string with one value and a NA value with another, use NVL2.

Return Value

The specified replacement value when the value of the base expression is NA, or the base expression when the value of the base expression is not NA. The data type of the return value is always the same as the data type of the base expression.

Syntax

NVL (exp , replacement-exp)

Arguments

expr

The expression that you want to replace when it has a NA value or an empty string.

replacement-exp

The value with which you want to replace a NA value.

Examples

Example 8-45 Working with NVL

SHOW NVL('First String', 'Second String')
First String
 
SHOW NVL('', 'Second String')
Second String