Hi,

I Created a Function to split the string when i am executing this function with passing required parameter it is giving me following error.

Error-->a query with object requires OCI8 mode,but OCI7 mode is used

Below is the Function Script:


CREATE OR REPLACE FUNCTION split

(

p_list VARCHAR2,

p_del VARCHAR2 DEFAULT ','

) RETURN split_tbl pipelined

IS

/*Updated By Sharad*/

l_idx PLS_INTEGER;

l_list VARCHAR2(32767) := p_list;

c_list INTEGER;

l_value VARCHAR2(32767);

BEGIN

LOOP

l_idx := INSTR(l_list,p_del);

c_list:=1;

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;

c_list:=c_list+1;

END LOOP;

RETURN;

END split;
/



also i am executing query on above function as below:

SELECT split('6,12',',') FROM dual

please suggest me how to resolve above mentioned error.

Regards
Prasad