Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> how does a pl/sql function handle an 'IN' list operator as a parameter

how does a pl/sql function handle an 'IN' list operator as a parameter

From: kilidire <yc_at_hwcn.org>
Date: Tue, 29 May 2001 10:01:52 GMT
Message-ID: <3b1371d9.23215802@news>

I want to use the folowing query inside a pl/sql function or procedure and return a resultset or recordset. The challenging part I'm finding out is how to supply the IN List as a parameter . Any ideas ? Thanks.

select * from emp where empname IN ('smith','john','white','jake')

of course, the in list can contain anything from 1 value to 100 values. The values are only known at runtime.

eg
create or replace function doThis(param1 in varcahr2) return ref_cursor_type
as
c1 is ref_cursor_type;

begin
open c1 as select * from emp where empname IN (param1);

return c1;
end;

Thanks for any feedback. Received on Tue May 29 2001 - 05:01:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US