Home » SQL & PL/SQL » SQL & PL/SQL » Passing a parameter list for IN clause in cursor.
Passing a parameter list for IN clause in cursor. [message #491] Fri, 15 February 2002 06:35 Go to next message
Avery
Messages: 4
Registered: February 2001
Junior Member
I'll try to explain this as best I can. I basically have a procedure that I would like to pass a data list to, I want the data list to be used in the IN clause of a cursor.

EX.
CREATE OR REPLACE PROCEDURE forum_example(param_list IN VARCHAR2)

CURSOR get_list is
SELECT *
FROM the_table
WHERE the_field IN (param_list);

BEGIN
OPEN get_list

**** LOGIC ****

CLOSE get_list;
END

It seems to me that when I pass a comma delimited list oracle sees that as a single value thus no results. Is this even possible to do? If not how would you suggest I accomplish something like this. Thank you very much for your help.

-Avery
Re: Passing a parameter list for IN clause in cursor. [message #494 is a reply to message #491] Fri, 15 February 2002 10:48 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
http://www.orafaq.net/msgboard/plsql/messages/6998.htm
Previous Topic: Date function
Next Topic: Add Date Function
Goto Forum:
  


Current Time: Thu Mar 28 04:11:19 CDT 2024