com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-420, SQLSTATE=22018, SQLERRMC=INTEGER,

发布网友 发布时间:2022-04-23 09:08

我来回答

1个回答

热心网友 时间:2023-10-09 02:39

调用INTEGER函数的时候存入了非法的字符串。这个字符串只能够包含数字。
有可能是传入了一个float数的字符串作为Integer的参数。

$ db2 ? sql420

SQL0420N Invalid character found in a character string argument of the
function "<function-name>".

Explanation:

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. The function or data
type used in the SQL statement may be a synonym for "<function-name>".

If a decimal character is specified in the DECIMAL function then that is
the character that must be used in place of the default decimal
character.

User response:

Ensure that the character strings that are being converted to numeric
types contain only characters that are valid in numeric SQL constants,
using the decimal character, if specified.

sqlcode: -420
sqlstate: 22018

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com