-20353   AN OPERATION INVOLVING COMPARISON CANNOT USE OPERAND name DEFINED AS DATA TYPE type-name

Explanation

The use of the value identified by name defined as data type type-name is not permitted in an operation that involves comparisons. This error can be returned for an expression that results in a type-name data type in the following contexts:
  • A SELECT DISTINCT statement.
  • A GROUP BY clause.
  • An ORDER BY clause.
  • An aggregate function with DISTINCT.
  • A SELECT or VALUES statement of a set operator other than UNION ALL.

System action

The statement cannot be processed.

Programmer response

The requested operation on the data type type-name is not supported. You can change the data type of the value to a data type that is supported using a cast or some other function.

SQLSTATE

42818