Procedures/Functions with variable number of parameters
847441Apr 9 2011 — edited Apr 9 2011Hello guys,
I have a need of doing a PL/SQL Procedure / Function with variable number of parameters. I need to do something like this:
function_name (parameter1 in varchar2, parameter2 in number, array_like_input in extrange_type, array_like_output out extrange_type)
Where:
- parameter1: a usual varchar2 parameter
- parameter2: a usual number parameter
- array_like_input: a parameter where I can pass 2, 3 or 20 parameters
- array_like_output: a parameter where I can get 2, 3 or 20 parameters
Has any of you any advice on how to do that?
I've been reading about varray and about user defined types, but I were wondering what's the better way to do this.
Thanks a lot and have a nice weekend,
Luis Miguel