Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

exlude parameters values if null from the where condtion

prashweenetOct 20 2009 — edited Oct 20 2009
Hi All

Is there any possiblility to avoid null values from a where condition

for example where conditon like

cursor get_cust is

select from customer*
where customer_id = customer_

sometimes null valius can be passed to customer_ , in this case it returns empty rows, instead i should be able to exclude filtering the customer_id if the customer_ is null ( if the customer_ parameter is null then i should get the complet row set excluing the filter)

is ther any way of writing this without dynamic sql. cusomter_id field is always bears value.

Thanks
Prash
This post has been answered by Solomon Yakobson on Oct 20 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2009
Added on Oct 20 2009
14 comments
2,221 views