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!

How to pass multiple values if null is passed

curious_mindMay 28 2019 — edited May 29 2019

Hi All,

I have a requirement where in one of the stored procedure i have to pass one input parameter which is optional and here are the scenarios i have to cover for that column.

1.     If value is passed then it will retrieve only the matching data, like as

phn_typ_cde  = phn_typ_cde_in

2.    if the value is not passed then it should include these 3 values such as AND   'BUSN','CELL','FAX';

Not sure how to achieve this in my code, i am looking for an option where i do not have to use the conditional statements like if/case etc. Please provide your assistance.

This post has been answered by Solomon Yakobson on May 28 2019
Jump to Answer
Comments
Post Details
Added on May 28 2019
4 comments
1,294 views