8 Replies Latest reply: Nov 26, 2012 7:51 AM by BluShadow RSS

    SQL Decode or Case Help

    943841
      Hi.,

      Just confused why the below statement is not producing the correct output..its printing as Hello.
        select decode(to_char(sysdate,'Day'),'Mon','Hi','Hello')
        from dual
      But this statement is getting me correct result..
        select decode(to_char(sysdate,'dd'),'26','Hi','Hello')
        from dual
      Any explantions?..anything to do with to_char ?

      Thanks