ops$tkyte%ORA9IR2> create or replace type my_args as table of varchar2(4000)
2 /
Type created.
ops$tkyte%ORA9IR2>
ops$tkyte%ORA9IR2>
ops$tkyte%ORA9IR2> create or replace function foo( p_inputs in my_args ) return varchar2
2 as
3 l_str long;
4 begin
5 for i in 1 .. p_inputs.count
6 loop
7 l_str := l_str || ', ' || p_inputs(i);
8 end loop;
9 return substr( l_str, 3 );
10 end;
11 /
Function created.
ops$tkyte%ORA9IR2> show errors
No errors.
ops$tkyte%ORA9IR2>
ops$tkyte%ORA9IR2> select foo( my_args('a','b','1','2') ) from dual;
FOO(MY_ARGS('A','B','1','2'))
-------------------------------------------------------------------------------
a, b, 1, 2
ops$tkyte%ORA9IR2> select foo( my_args('x','y',1,sysdate,'a','b','1','2') ) from dual;
FOO(MY_ARGS('X','Y',1,SYSDATE,'A','B','1','2'))
-------------------------------------------------------------------------------
x, y, 1, 30-SEP-08, a, b, 1, 2