Comparing Dates in Oracle SQL

31-DEC-95 isn’t a string, nor is 20-JUN-94. They’re numbers with some extra stuff added on the end. This should be ’31-DEC-95′ or ’20-JUN-94′ – note the single quote, ‘. This will enable you to do a string comparison. However, you’re not doing a string comparison; you’re doing a date comparison. You should transform your string into a date. Either by using the built-in TO_DATE() function, … Read more