Start of change

-20477   THE function-name FUNCTION IS NOT ABLE TO USE FORMAT STRING format-string TO INTERPRET THE ARGUMENT string-expression.

Explanation

The function-name function was invoked with format-string and string-expression. This function-name value is DECFLOAT_FORMAT, even if the name used to invoke the function is TO_NUMBER. The value of the argument string-expression cannot be interpreted with the format string format-string to produce a DECFLOAT(34) value. This error can occur for any of the following reasons:

  • string-expression is too long for the specified format string
  • string-expression does not conform to the template specified in the format string; for example: Too many digits were specified in string-expression for the corresponding format element in the format string, such as in the specific case where 1234 is not a valid value for 999
  • A value in string-expression is not valid for the corresponding format element in the format string, such as in the specific case where $ is not a valid value for S

System action

The statement cannot be processed.

User response

Change the arguments of the function-name function to valid values.

SQLSTATE

22018

End of change