Oracle database
SELECT NVL( col1,
col2)
FROM t1;
Note: col1 is assumed to be VARCHAR(100) type, and col2 is assumed to be CHAR(100) type
Fujitsu Enterprise Postgres
SELECT NVL( col1,
CAST(col2 AS VARCHAR(100)))
FROM t1;
Note: col1 is assumed to be VARCHAR(100) type, and col2 is assumed to be CHAR(100) type
Value expressions with different data types can be specified. If the first argument is a string value, then VARCHAR2 is returned, and if it is a numeric, then a numeric type with greater range is returned.
Value expressions with different data types cannot be specified.
Since the data types that can be specified for the expressions in the two arguments are unknown, use the following steps to convert:
Check the data types specified for each of the two expressions.
Using the data type that is to be received as a result, explicitly convert the other argument with CAST.