This content has been marked as final. Show 3 replies
933663 wrote:You did not show what your Function is and what value it returns.
I am having a string of about 10000 character with the comma separation.
I am passing the string to a comma separated function say as fn_split which will in-turn will have the split up of string based on comma separation.
Each string max can be of length 100 characters.
I am passing my input to fn_split function and i am inserting it to a table
inputstring varchar2 :'some 10000 characters with comma separation of each column length max of 100 characters .........................'
insert into mytable
Select * from table(fn_split(inputstring))
but i'm getting the error as
mytable is a varchar2 field of about 120
ORA-01461: can bind a LONG value only for insert into a LONG column
I am guessing that it returns a LONG value and as you just saw only Long column can accomodate Long datatypes.
And since LONG datatypes are deprecated, I would suggest you to use a CLOB datatype.
Looking at the Function call and the Column information of 120 bytes wide, how does your function know which line it needs to split and return?
The above problem is because of more than 4k characters in the string.
Is this any different to your other couple of questions?
Seperate the string value
Re: SQL Error: ORA-01704: string literal too long
Please do NOT duplicate your questions on the forum. It confuses people as to what you have already been advised.
Ask a question once and keep posting on the same thread. You will not get better or quicker answers by duplicating your question.