Top
Symfoware Server V12.1.0 Application Development Guide
FUJITSU Software

B.4.1 Obtaining Result from Arguments with Different Data Types

Oracle database

SELECT NVL( col1,
            col2)
  FROM t1;

* col1 is assumed to be VARCHAR(100) type, and col2 is assumed to be CHAR(100) type

Symfoware Server

SELECT NVL( col1,
            CAST(col2 AS VARCHAR(100)))
  FROM t1;

* col1 is assumed to be VARCHAR(100) type, and col2 is assumed to be CHAR(100) type


Feature differences
Oracle database

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.

Symfoware Server

Value expressions with different data types cannot be specified.

Conversion procedure

Since the data types that can be specified for expressions 1 and 2 are unknown, use the following steps to convert:

  1. Check the data types specified for the expressions 1 and 2.

  2. Using the data type that is to be received as a result, explicitly convert the other argument with CAST.