Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cursor parameters with null values
Whoa, I answered my own 'boy am I brain-dead today' question.
It is called an 'OR'
For all of you that were lining up to reply, no need.
thx
"tim" <tjbezek_at_comcast.net> wrote in message
news:gXjab.380240$cF.113968_at_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 - 16:36:58 CDT