Hi,
Here is the general scope of my issue. I need to execute an arbitrary stored procedure/function. Only the name of the procedure is available and it is the result of a lookup from a table. At this point, I do not know the arguments (argument name, in or out or the data type) the arbitrary procedure requires in advance.
I have written a prcedure that will run any arbitrary (Run_Arbitrary) procedure, however, the limitation is I need to list the arbitrary procedure's argument information(i.e. modes (in/out), and data type, value) and pass the information to my Run_Arbitrary stored procedure. I would like to be able to dynamically build this argument list so that it will be generic. To over come this limitation, I query the user_arguments view, hoping it would provide me with information on building the parameter list. This is where I am having a problem:
- How do I determine the order of the parameter and if function overloading exists:
- How do I group the parameter entries from User_Arguments that belongs to each overloading function?
Here's an example of the columns returned data querying User_Arguments:
Select * from User_Arguments
Where Package_Name = name_of_package
ANDn Object_Name = name_of_procedure_function;
Return Columns:
Package_Name
Object_Name
OverLoad
Argument_Name
In_Out
Position
Sequence
Data_level
Data_Type
Data_Length
Data_Precision
Data_Scale
Type_Owner
Type_Name
Type_SubName
Type_Link
Default_Value
Default_Length
...
Thanks
Here is the general scope of my issue. I need to execute an arbitrary stored procedure/function. Only the name of the procedure is available and it is the result of a lookup from a table. At this point, I do not know the arguments (argument name, in or out or the data type) the arbitrary procedure requires in advance.
I have written a prcedure that will run any arbitrary (Run_Arbitrary) procedure, however, the limitation is I need to list the arbitrary procedure's argument information(i.e. modes (in/out), and data type, value) and pass the information to my Run_Arbitrary stored procedure. I would like to be able to dynamically build this argument list so that it will be generic. To over come this limitation, I query the user_arguments view, hoping it would provide me with information on building the parameter list. This is where I am having a problem:
- How do I determine the order of the parameter and if function overloading exists:
- How do I group the parameter entries from User_Arguments that belongs to each overloading function?
Here's an example of the columns returned data querying User_Arguments:
Select * from User_Arguments
Where Package_Name = name_of_package
ANDn Object_Name = name_of_procedure_function;
Return Columns:
Package_Name
Object_Name
OverLoad
Argument_Name
In_Out
Position
Sequence
Data_level
Data_Type
Data_Length
Data_Precision
Data_Scale
Type_Owner
Type_Name
Type_SubName
Type_Link
Default_Value
Default_Length
...
Thanks