SQL0401N The data types of the operands for the operation "<operator>"
are not compatible.
The operation using "<operator>" cannot be processed for one of the
* The data types of the operands must be compatible but there is at
least one pair of types that is not compatible.
* The data type of an operand is XML which cannot be compared (with
itself or any other type).
* The data type of an operand is DATALINK which cannot be compared
(with itself or any other type).
* The data type of an operand is a structured type which cannot be
compared (with itself or any other type).
Federated system users: this data type violation can be at the data
source or at the federated server.
Some data sources do not provide the appropriate values for
"<operator>". In these cases the message token will have the following
format: "<data source>:UNKNOWN", indicating that the actual value for
the specified data source is unknown.
The statement cannot be processed.
Check all operand data types to ensure that they are comparable and
compatible with the statement usage.
If all the SQL statement operands are correct and accessing a view,
check the data types of all the view operands.
Federated system users: if the reason is unknown, isolate the problem to
the data source failing the request (see the Troubleshooting Guide for
procedures to follow to identify the failing data source) and examine
the data type restrictions for that data source.
ramesh.ibm, The error message means just what it says. You have a comparison using = (the <operator> from your actual error message) that has different data types that DB2 can not compare. For example:
123 = '123'
can not be compared. One date type is a numeric (Smallint) and the other is a alpha (Character).
Check your SQL and see what the various data types are of the columns / values you are comparing. Once you find it, you can probably convert one data type so it does match (i.e. using CAST).