I need to compare the dates in 2 tables, but the problem is that one table has a date in DD-Mon-YY format and the other in YYYYMM format.
I need to make both of them YYYYMM for comparison.
I need to create something like this:
SELECT * FROM offers
WHERE offer_date = (SELECT to_date(create_date, 'YYYYMM') FROM customers where id = '12345678')
AND offer_rate > 0
where create_date is something like 12-Mar-2006, and offer_date is something like 200605
Any ideas I need to adapt this query in?
source
share