I might have posted this question in the wrong section, I'm not sure.
I have created a function using sample code I found online to split string values in a comma separated field in the database. The values in the database are read into a parameter in a stored procedure and the stored procedure is meant to call the function to split the comma separated values into individual values.
This is the function I am using:
create or replace FUNCTION PARAMSPLIT ( p_list VARCHAR2 , p_del VARCHAR2:= ',' , SPLIT_TBL VARCHAR2
) RETURN SPLIT_TBL PIPELINED IS l_idx pls_integer; l_list varchar2(32767) := p_list; SPLIT_TBL:= SPLIT_TBL; --AA l_value varchar2(32767); BEGIN LOOP l_idx := instr(l_list,p_del); if l_idx > 0 then pipe row(substr(l_list,1,l_idx-1)); l_list := substr(l_list,l_idx+length(p_del)); else pipe row(l_list); exit; end if; END LOOP;
RETURN; END PARAMSPLIT;
I am getting the following error when I compile the function:
Error(13,12): PLS-00103: Encountered the symbol "=" when expecting one of the following: constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national character nchar The symbol "<an identifier>" was substituted for "=" to continue.
Would someone be able to help me?
|