-401 The operands of an arithmetic or comparison operation are not comparable.

Explanation

An arithmetic operation that appears within the SQL statement has a mixture of numeric and nonnumeric operands, or the operands of a comparison operation are not compatible. An arithmetic or comparison operation is defined in the statement with operands that include non-comparable data types. Examples include:
  • Comparison of numeric and character data types
  • Comparison of numeric and graphic data types
  • Comparison of date and non-date data types
  • Comparison of time and non-time data types

User response

The statement cannot run. 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 and a view is being accessed, check the data types of all the operands in the view definition