-415   THE CORRESPONDING COLUMNS, column-number, OF THE OPERANDS OF A SET OPERATOR ARE NOT COMPATIBLE

Explanation

The data types of the corresponding columns of a UNION, EXCEPT, or INTERSECT set operator are not compatible, or the corresponding columns do not have the same field procedure. The relative position of the value in the select list is column-number.

This error is issued if one of the columns is a distinct type, and the other column is not a distinct type, or the other column is a different distinct type. This error code is also issued if one column is defined with a field procedure, and the other column is not defined with the same field procedure. If corresponding columns have field procedures, they must both be defined with the same field procedure.

System action

The statement cannot be processed.

Programmer response

Check the data types of the specified columns and correct the statement containing the set operator to ensure that all corresponding columns have comparable column descriptions. A CAST specification can be used to make the data type of the columns compatible.

SQLSTATE

42825