Start of change

-461 A VALUE WITH DATA TYPE source-data-type CANNOT BE CAST TO TYPE target-data-type

Explanation

The statement contains an implicit or explicit CAST, but the combination of the source and target data types is not supported. Db2 attempted to cast a value of source-data-type to the data type target-data-type. This combination is not supported.

This error is also issued for a statement that references multiple encoding schemes, when there is an attempt to cast a string value with a field procedure. This combination is not supported.

Start of changeThis error can be issued for an attempt to use a feature that requires a higher APPLCOMPAT setting than the current setting. The current APPLCOMPAT setting does not support a feature that was requested.End of change

System action

The statement cannot be processed.

Programmer response

Change the data type of either the source or target so that the cast is supported.

For built-in data type values, a cast involving a user-defined distinct type value, or a cast involving an array value, see Casting between data types.

If an explicit CAST was specified, correct the CAST specification to specify a supported combination of source and target types.

SQLSTATE

42846

End of change