Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: variable list of arguments to a pl/sql procedure
"Oxnard" <shankeypNO_SPAM_at_comcast.net> wrote in message
news:D-OdnQBEMoDjADTfRVn-uQ_at_comcast.com...
> ver 9.2.0.5
>
> I think I can overload a procedure but the variable list could be between
1
> and a couple 100, so that's not a good option.
>
> I am thinking about bringing the list in as a string then parsing it. and
> creating a varry or something like that.
>
> I would like some comments from others who have had to deal with simular
> issues.
You can try something like:
SQL> CREATE OR REPLACE TYPE TSTRINGSTBL AS TABLE OF VARCHAR2(2000)
2 /
Type created.
SQL> create or replace procedure TestVarArg(Args TStringsTbl) is
2 begin
3 for i in Args.First..Args.Last loop
4 dbms_output.put_line('Args('||i||')='||Args(i));
5 end loop;
6 end;
7 /
Procedure created.
SQL> begin
2 TestVarArg(TStringsTbl('One','Two','Three'));
3 end;
4 /
Args(1)=One Args(2)=Two Args(3)=Three
Dmitry Received on Fri Jun 10 2005 - 11:41:09 CDT
![]() |
![]() |