[英]ORA-06502 PL/SQL: numeric or value error: character to number conversion error;
In function I have got ORA-06502 error on this line: 在函数中,我在此行出现了ORA-06502错误:
newlist := LTRIM(RTRIM(newlist)) + ',';
CREATE OR REPLACE FUNCTION String_To_Int_Table
(
list VARCHAR2
, delimiter NCHAR DEFAULT ','
)
RETURN t_nested_table
AS
value VARCHAR(11);
position INT;
newlist varchar2(4096);
tableList t_nested_table;
...
newlist := list;
newlist := LTRIM(RTRIM(newlist)) + ',';
I don't see any conversion problem here. 我在这里看不到任何转换问题。 / totally confused /
/ 完全困惑 /
the string concatenation operator in oracle is ||
oracle中的字符串连接运算符是
||
, not +
. ,而不是
+
。
The bytecode compiler tries to auto-convert the varchar2 operands of the sum to numbers and predictably fails. 字节码编译器尝试将总和的varchar2操作数自动转换为数字,并且可预期会失败。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.