IBM Support

SQL0420N Invalid character found in a character string argument of the function "DECFLOAT"

Troubleshooting


Problem

Notice multiple dump.bin errors and SQL0420N Invalid character found in a character string argument of the function "DECFLOAT" in db2diag.log

Symptom

In DB2 V 9.7 FP 5 & in DB2 V 10.5 , a command similar to :

db2 "values ('SMS' + '.')" may result in

SQL0402N The data type of an operand of an arithmetic function or operation "+" is not numeric. SQLSTATE=42819

Cause



The function 'function-name' has a character string argument that contains a character that is not valid in a numeric SQL constant. The function may have been called as a result of using the CAST specification with 'function-name' as the target data type or when an argument is implicitly cast to a numeric data type such as DECFLOAT.


The function or data type used in the SQL statement may be a synonym for 'function-name'. Using the plus symbol in an expression causes query rewrite to apply a numeric function, such as DECFLOAT, to the expression. If there are strings in the expression, then applying a numeric function to strings subsequently fails with this message.

Resolving The Problem

If it can be identified in which part of the application, it uses('SMS' + '.'), correcting it to 'SMS'||'.' should be the solution.

Else need to trace to identify the query causing the error.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"OTHER - Uncategorised","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.5;9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21998393