I was wondering if it was possible to store multiple values into one varaible. Something along the lines of...
Oracle: 10g
--Table xSample (this is obviously a dumbed down version of the table for the sake of showing what I want to accomplish
S_ID YEAR
1 2009
2 2009
3 2009
4 2009
--Query
select s_id
into pID
from xSample
where year = 2009;
Basically the reason I was trying to figure out how to store multiple values into a variable is b/c I was going to use that variable (pID) as a parameter and have it's values passed dynamically when the proc was called. The values would go into a query that would look something like:
select *
from cust_data
where person_id in (pID)
aka
select *
from cust_data
where person_id in (1,2,3,4)
Not sure if this is possible, but if anyone knows of a way I could accomplish this that would be great.
Edited by: user652714 on Dec 23, 2009 9:37 AM