Can someone tell me why the following query is considered invalid in Oracle?
SELECT TO_CHAR(start_date,'dd/month')
FROM Table1
WHERE start_date IN (TO_DATE('JUN 15 12'), TO_DATE('AUG 19 12'));
Is it because ‘dd/month’ is considered invalid format when combined?
or is it because date cannot be compared using IN?
P.S> I do not have access to Oracle database at this time that’s why i can’t run the sql and get exact error. All I know is the statement is invalid and I wanted to know what is the problem. I am new to Oracle
Unless you have changed your session/database parameters, TO_DATE format should be in form dd-mon-yy. The second parameter to TO_DATE is the incoming date format.