vendredi 17 février 2017

Character comparison in CASE WHEN structure in Oracle

I write that query on Friday:

SELECT 
CASE TO_CHAR(SYSDATE,'Day') WHEN 'Friday'
THEN 'Yes'
ELSE 'No'
END
FROM DUAL;

But the result always 'No' while it's supposed to be 'Yes'. Where did I go wrong? Is it something wrong with character comparison in CASE WHEN structure

Aucun commentaire:

Enregistrer un commentaire