0

In function I have got ORA-06502 error on this line:

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/

1 Answer 1

3

the string concatenation operator in oracle is ||, not +.

The bytecode compiler tries to auto-convert the varchar2 operands of the sum to numbers and predictably fails.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.