I have a table that looks roughly like this
| NR | PRD_NR | CLT_NR | DATE |
|---|
| 123 | 65789 | 569123 | |
| 124 | 57698 | 478966 | 01/10/2015 |
| 125 | 53789 | 389737 | |
| 126 | 13547 | 021534 | 04/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