PL/SQL: numeric or value error 入参varchar2型长度问题。调存过报错,请教大神。
时间:2022-09-12 22:48:41
调存过报如下错误:
org.springframework.jdbc.BadSqlGrammarException: Hibernate-related JDBC operation; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 1
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.supp
存过定义如下:
PROCEDURE PARTMERGE_801006(PI_INMSG IN VARCHAR2, --入参消息体
PO_INMSG OUT VARCHAR2, --出参消息体
PO_APPCODE OUT VARCHAR2,
PO_ERRMSG OUT VARCHAR2) IS
PRM_APPCODE VARCHAR2(10);
PRM_ERRMSG VARCHAR2(1000); --错误信息
V_LISTUNITRULE LONGCODEC_UTIL.NUMBER_TABLE := LONGCODEC_UTIL.DECODE('10,6,3,10');
T_LISTCACHE LONGCODEC_UTIL.VARCHAR2_TABLE_TABLE;
V_RESULTSTRING VARCHAR2(32767);
BEGIN
/*INSERT INTO BBA3
(PRO_NAME, PRO_MSG, SEQLOGID, AAE301)
VALUES
('PKG_SBK_ZKSE4.PARTMERGE_801006', PI_INMSG, NULL, SYSDATE);*/
T_LISTCACHE := LONGCODEC_UTIL.DECODELIST(PI_INMSG,
V_LISTUNITRULE,
V_RESULTSTRING,
PRM_APPCODE,
PRM_ERRMSG);
FOR N IN T_LISTCACHE.FIRST .. T_LISTCACHE.LAST LOOP
SZYTH.PKG_SBK_ZKSE4.PARTMERGE_801006(T_LISTCACHE(N) (1),
T_LISTCACHE(N) (2),
T_LISTCACHE(N) (3),
T_LISTCACHE(N) (4),
PRM_APPCODE,
PRM_ERRMSG);
IF PRM_APPCODE <> 0000 THEN
PO_APPCODE := PRM_APPCODE;
PO_ERRMSG := PRM_ERRMSG;
RETURN;
END IF;
PO_APPCODE := PRM_APPCODE;
END LOOP;
END PARTMERGE_801006;