Top
Symfoware Server V12.1.0 Application Development Guide
FUJITSU Software

B.2.3 Obtaining Comparison Result from Values with Different Data Types

Oracle database

SELECT DECODE( col1,
               '1000', 'A',
               '2000', 1,
               'OTHER')
FROM t1;

* col1 is assumed to be CHAR(4) type

Symfoware Server

SELECT DECODE( col1,
              '1000', 'A',
              '2000', '1',
              'OTHER')
FROM t1;

* col1 is assumed to be CHAR(4) type


Feature differences
Oracle database

The data types of all result values are converted to the data type of the first result value.

Symfoware Server

Results in an error.

Conversion procedure

Convert using the following procedure:

  1. Check the literal data type for the first result value specified.

  2. Change the literals specified for each result value to the literal data type checked in the step 1.