Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Missing keyword in case statement

9d65a677-be72-42ac-a1e6-d5c589f85d57Jul 15 2015 — edited Jul 16 2015

Hi There,

I am unable to figure why I am getting the below error:

[Error Code: 905, SQL State: 42000]  ORA-00905: missing keyword

Below is the SQL query:

select case_id from case_routing

        where to_state_id in (100012, 100015)

        and case when to_char(sysdate, 'fmDay') = 'Monday'

        then

                trunc(route_date) = trunc(sysdate-3)

        else

                trunc(route_date) = trunc(sysdate-1)

        end

Any inputs or suggestions will be greatly appreciated.

Thanks,

K

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2015
Added on Jul 15 2015
3 comments
901 views