Reputation:
I have Oracle data in which I only want to retrieve the records that have a date from a column that is greater than the date of another column date.
select o.outage_k,o.work_fldr_k,o.crt_d, o.closed_d,o.etr_d from outage o
I was wondering if I want to filter out date in the SELECT or in the WHERE clause?
So a Case Statement?
In the the query I show in the screenshot I would NOT want to return that records BECAUSE ETR_D is greater than Closed_D
So what I want is to return all records in where CLOSED_D > ETR_D
Probably cannot use greater than > symbol as well for date compare
Upvotes: 0
Views: 371
Reputation: 24291
You can just compare the dates in WHERE clause:
WHERE CLOSED_D > ETR_D
Did something not work when you tried that?
Upvotes: 0