Home » SQL & PL/SQL » SQL & PL/SQL » cursors with where in clause (windows)
cursors with where in clause [message #423051] Mon, 21 September 2009 23:28 Go to next message
pradeepsakti
Messages: 37
Registered: May 2009
Member

Hello all..

can anyone pls help me
1. How to use cursors if I get an array of numbers as input and I need to compare the array with where in.

2. Or is there anyway to get any number of inputs i.e. say less than 50 0nly but varied between 1-50 for a cursor and then compare them with WHERE IN clause??

typically I am looking for this

cursor(p_nums IN NUMEBR)
select * from emp
where id IN (p_nums);

Thanks alot in advance.
Re: cursors with where in clause [message #423052 is a reply to message #423051] Mon, 21 September 2009 23:33 Go to previous message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Asked almot every week, search for "varying inlist" or the like.

Regards
Michel
Previous Topic: NEED SQL HELP PLEASE
Next Topic: select ... for update lock type is RX not RS?
Goto Forum:
  


Current Time: Fri Feb 07 18:04:06 CST 2025