ORA-06502: PL/SQL: numeric or value error: character to number conversion error 错误的解决方法

时间:2014-08-04 20:36:38   收藏:0   阅读:2547

故障描述:
中间层调用存储过程报错,到PL/SQL中对存储过程进行调试报以下错误

ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "PROCESS_DRUG_SAME_AS_INFO", line 24
ORA-06512: at line 1

错误原因:

找到存储过程PROCESS_DRUG_SAME_AS_INFO,并将代码定位在24行,发现代码中两个字符串的变量使用了+进行赋值:

ls_same_code := ls_same_code+‘|‘+ls_sames;

 

解决方法:

修改代码,将+替换成||:

ls_same_code := ls_same_code||‘|‘||ls_sames;

重新编译存储过程后,问题解决;

ORA-06502: PL/SQL: numeric or value error: character to number conversion error 错误的解决方法,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!