Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> cursor parameters with null values
I have a cursor that I pass several parameters into. One of the parameters
may or may not be null. My question is, will it work either way?
example:
cursor c_test (p_1 VARCHAR2, p_2 VARCHAR2)
is
select data1, data2
from test_data
where param1 = p_1
and param2 = p_2;
If both p_1 and p_2 are not null, everything will be fine, but if p_2 is
null,
then it won't.
Is there a slick way to handle this situation?
Thanks,
Tim Received on Thu Sep 18 2003 - 10:12:12 CDT