When 'Hi' is encountered in a ret-val position, the error is produced because the CHAR(2)
type argument is not comparable with a NUMERIC(18,6) type return value.
This statement is equivalent and will not produce an error:
SELECT decode( (?p1 || ?p2), trim(?p1), 'Hi' ) from emp;
394
SQL Functions and Expressions