Home » SQL & PL/SQL » SQL & PL/SQL » Is it possible to pass multiple values to a parameter in a procedure
Is it possible to pass multiple values to a parameter in a procedure [message #213373] Wed, 10 January 2007 08:27 Go to next message
raghavakurupati
Messages: 1
Registered: November 2006
Location: Bangalore
Junior Member

Hi,

i have one procedure which has empno (employee table) as IN parameter .With this procedure i can pass only one value at a time. But i need to pass multiple values i.e values seperated by commas.

Is it possible in PL/SQL procedures or not?

Actually this procedure is scheduled in a JOB process in UNIX.

Do i need to change that shell script ? Please suggest me and give me one example.

Regards,

Rajesh.
Re: Is it possible to pass multiple values to a parameter in a procedure [message #213379 is a reply to message #213373] Wed, 10 January 2007 08:59 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
What is generating this comma separated list of values?

If it's an anonymous pl/sql block, then the easiest things to do are:
1) Change the procedure to accept a collection rather than a single value, build and populate such a collection, and pass it in.

2) Populate a global temporary table with the ids, and read them directly from the table in the procedure.

3) create a comma separated list in a single string, and then use substr and instr to split the ids out of the string once you're inside the procedure.
Previous Topic: Get file from internet
Next Topic: workaround ORA-30926 (merge statement)
Goto Forum:
  


Current Time: Mon Dec 05 08:44:38 CST 2016

Total time taken to generate the page: 0.06357 seconds