Start of change

-401   THE DATA TYPES OF THE OPERANDS OF AN OPERATION ARE NOT COMPATIBLE

Explanation

An operation cannot be processed for one of the following reasons:
  • The data types of the operands must be compatible but at least one pair of data types is not compatible.
  • An operation contains a mixture of numeric and non-numeric operands.
  • One of the operands is a column defined with a field procedure, and another column operand is not defined with the same field procedure. If one column of arithmetic or comparison operation is defined with a field procedure, other columns in the operation must be defined with the same field procedure.

System action

The statement cannot be processed.

Programmer response

Check the data types of all operands to ensure that their data types are comparable and compatible with their usage in the statement.

If all the operands of the SQL statement are correct, then, if a view is being accessed, check the data types of all the operands in the view definition.

SQLSTATE

42818

End of change