|
-
 Originally Posted by LKBrwn_DBA
Try:
Code:
...
Column4 IS null and
...

Thanks for the reply. I want to use the above query in a stored procedure which have null values for the parameters as below:
create or replace
procedure MyProcedure
(val1 in varchar2 default null,
val2 in varchar2 default null,
val3 in varchar2 default null,
val4 in varchar2 default null,
val5 in varchar2 default null,
val6 in varchar2 default null,
val7 in varchar2 default null,
val8 in varchar2 default null,
cCount in number,
DataSet OUT Types.cursor_type)
as
begin
OPEN DataSet FOR
select CID
from MyTable
where Column_1 = val1 and
Column_2 = val2 and
Column_3 = val3 and
Column_4 = val4 and
Column_5 = val5 and
Column_6 = val6 and
Column_7 = val7 and
Column_8 = val8 and
Column_9 = Count;
end;
My paramters will sometimes have values and some times null. I can not use IS NULL all the time. Please advise.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|