Help on an Oracle Query
Posted on 2010-11-16
For anyone who knows Oracle this should be cake. For me being proficient and used to SQL Server this is a complete headache that I can't figure out something that would be so easy.
I've got a table called Customer with a relevant column ExpirationDate
I need a query that will return all the records in this table where the expirationDate is less than the current date. Or in other words, all records having an expiration data that has already passed.
This is what I have so far...
SELECT * FROM Customer
WHERE EXPIRATIONDATE < SYSDATE
which sort of works, but I need records that have an expiration date of the current date not to show up in the query.
The expiration dates in the table are all in the form of...
So because SYSDATE returns a date that has a time that is later in the day than the DateTime above, that record is being included in the query. I only want a record having an expiration date of 16-Nov to show up in this query if today's date were 17-Nov or later.
Thanks for the help.