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: 64130
Registered: March 2007
Location: Nanterre, France, http://...
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: Wed Dec 07 06:56:25 CST 2016

Total time taken to generate the page: 0.07464 seconds