Skip to Main Content

APEX

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!

Using NVL in date condition

JulijanSep 22 2015 — edited Sep 23 2015

I have a table that looks roughly like this

NRPRD_NRCLT_NRDATE
12365789569123
1245769847896601/10/2015
12553789389737
1261354702153404/10/2015

And I'm trying to query it with a date condition. The value for the date would be coming from an apex page item (date item) which could be left null, and then it will return null values in the report.

How do I add an nvl condition for the date column? I've tried

select * from example_table where prd_nr = 13547 and --here date condition

= null doesn't work, so NVL is also useless as far as I know. In order to query this table I have to do something like 'where date is null or date = :P23_DATE' but that returns both records that are null and on input date.

Any help would be appreciated!

Thanks,

J

This post has been answered by fac586 on Sep 22 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2015
Added on Sep 22 2015
2 comments
1,616 views