Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> cursor parameters with null values

cursor parameters with null values

From: tim <tjbezek_at_comcast.net>
Date: Thu, 18 Sep 2003 15:12:12 GMT
Message-ID: <gXjab.380240$cF.113968@rwcrnsc53>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US