Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-800 Corresponding data types must be compatible in CASE expression or DECODE function.

All the result values in all the WHEN clauses in the CASE expression should be of compatible data types. In the linearized use of the CASE expression, the value-expression that follows the CASE keyword should be compatible with the value-expressions that follow all the WHEN keywords in the CASE expression. Reissue the query after modifying the CASE expression so that all related expressions are of compatible data types.

This error can also occur when the expressions for the DECODE function do not have compatible data types. The DECODE function has four possible expressions: expr, when_expr, then_expr, and else_expr. All instances of when_expr must have the same or a compatible data type as expr. All instances of then_expr must have the same or a compatible data type as else_expr. Reissue the query after modifying the DECODE function so that all related expressions are of same or compatible data types.

This error can also occur when calling functions that use implicit casts and comparisons between data types, such as the NVL function. In this case, revise your program logic (for example, by adding an explicit cast). so that the expressions return the same or compatible data types.