I was working with a SQL statement trying to use TO_CHAR(SYSDATE,'DAY') to get all rows from a table where a specific column holds the day of the week (as the literal - i.e. TUESDAY). However - it wasn't working... So - I tried the following:
select sysdate from dual
where 'TUESDAY' = TO_CHAR(sysdate,'DAY');
Which didn't return any rows either...
However (not that this is what I was trying to do) this does work:
select sysdate from dual
where '3' = TO_CHAR(sysdate,'D');
I'm obviously missing something here... I don't understand why the first SQL doesn't work.
Can someone tell me what I'm missing?
Oracle Version 11.2.0.1