Home » SQL & PL/SQL » SQL & PL/SQL » Diffrent Number and type of parameter passing (11g)
Diffrent Number and type of parameter passing [message #618579] Mon, 14 July 2014 00:50 Go to next message
dara.naveen
Messages: 2
Registered: July 2014
Location: India
Junior Member

Hi All

I have requirment such as that the number and maybe even type of parameter that
I pass from the WEB page to my PL/SQL procedure may vary, how should I structure my
parameter passing? In my PL/SQL procedure, should I just use have a long list (over 30)
of all possible name/value pairs that might come from the WEB page or is there a more
elegant way to solve this prob?

Thanks & Regards,
Naveen D
Re: Diffrent Number and type of parameter passing [message #618580 is a reply to message #618579] Mon, 14 July 2014 01:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

PL/SQL package supports overloaded procedure, that is several procedures with same name and different parameters.

PL/SQL Language Reference
Chapter 8 PL/SQL Subprograms
Section Overloaded Subprograms

Re: Diffrent Number and type of parameter passing [message #618842 is a reply to message #618580] Wed, 16 July 2014 01:54 Go to previous messageGo to next message
dara.naveen
Messages: 2
Registered: July 2014
Location: India
Junior Member
Thaks for promt reply Michel

As per my requirement overloaded procedure is not applicable because I am comparing table attribute data between in excel reading through WEB page by passing to procedure and Tables in data base. For example I have EMP,DEPT and etc... Tables in that EMP has 5 columns in excel and DEPT has 3 columns in excel. So, I need to pass 5 different data type column names and column values to procedure for EMP table and 3 different data type column names and column values to procedure for DEP without creating in database.
Note: Number of tables and columns may vary for each time
Re: Diffrent Number and type of parameter passing [message #618850 is a reply to message #618842] Wed, 16 July 2014 02:32 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If you want so general (and weak) procedure then you have to convert all parameter to strings.
Anyway, what you want to do on your web page is, I think, display the values so they are strings.

Can you tell us what you want to do in your procedure?

Previous Topic: Query to get payroll values between dates
Next Topic: Materialized view
Goto Forum:
  


Current Time: Thu Apr 25 12:43:58 CDT 2024