Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing multiples value to a parameter

Status
Not open for further replies.

ekta22

IS-IT--Management
May 3, 2004
359
US
Hi,

I am using Crystal Reports to pass multiple value to my parameter(pSTATUS) declared in my oracle package.

Field for this parameter can accept upto three values..'O', 'X' and 'V'. The way it will be passed from Crystal to Oracle is in the following format depending on how many values a user selects.

O,X
O,X,V
O

I tried using the IN clause in my where statement but it does not work. I see all the values even if I select just one. How should I handle this in Oracle. I am using 10g.

Thanks in advance,

-E
 
You mean you are trying to do something like:

select x,y,z
from table
where column in p_parameter

That will not work. The only way to do this is to use dynamic SQL e.g.

v_sql := 'select x,y,z
from table
where column in ('||p_parameter||')';

open cursor for v_sql;
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top