SQL Query: How to pass list of values to the IN operator
622048Nov 16 2009 — edited Nov 16 2009Hi,
I'm trying to pass a list of values to the WHERE <a> IN <list>
I dont want to use dynamic cursors (REF CURSOR). Is this possible using Oracle SQL?
Please let me know.
My program:
DECLARE
...
list_of_ids := '10, 20, 30';
...
SELECT MAX(sal) INTO max_sal FROM employee WHERE emp_id IN (list_of_ids);
...
END;
/
Thanks in Advance,
Niko