Oracle: SELECT where date is less if not equals null
I have a table of records, and one column holds the value when the records
turns in-active. Most of the records are still open, and there for do not
hold any value in the end_date column. I want to select all of those
records, wich are still active. One way to achieve this (from the top of
my head):
select *
from table t
where nvl(t.end_date, to_date('2099-DEC-31', 'MM-DD-yyyy')) > sysdate
But it doesn't feel right. Is there a better way to achieve what I want?
No comments:
Post a Comment