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
The data types of all result values are converted to the data type of the first result value.
Results in an error.
Convert using the following procedure:
Check the literal data type for the first result value specified.
Change the literals specified for each result value to the literal data type checked in the step 1.