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!

Select all if parameter value is null.

matrosovMay 20 2011 — edited May 20 2011
Good Evening. I'm glad I found this forum. I have what I hope is a simple two part question. I have a simple query that goes like this.

Select Project_ID, Project_Desc
From Project_Table
Where project_id in(:Project)

What I'm attempting to do is to improve on this query.
1) What I want to do is to have query return entire list of projects if Project parameter is blank or null. Basically if project parameter is null the where clause should not apply
2) I'm also trying to get around the 1000 value string limitation for an in statement. There are about 5K records in this project and it is conceivable that the user might want to copy past 1500 into the parameter to see it on the report.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2011
Added on May 20 2011
6 comments
6,934 views