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

故障描述:
中间层调用存储过程报错,到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;

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

posted on 2014-08-04 16:53  无情的雨  阅读(7037)  评论(0编辑  收藏  举报

导航