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!

Case with where clause - ORA-00920: Invalid relational operator

1032484Sep 1 2013 — edited Sep 2 2013

Hi All, when I try to run the query below, I get the following error...

ORA-00920: invalid relational operator

00920. 00000 -  "invalid relational operator"

*Cause:   

*Action:

Error at Line: 16 Column: 5

Does anyone know what's wrong with my query? thanks in advance.

SELECT concat (year,period)

FROM DD_ACTUALS_FACT

WHERE CASE Period

WHEN 'JAN' THEN '01'

WHEN 'FEB' THEN '02'

WHEN 'MAR' THEN '03'

WHEN 'APR' THEN '04'

WHEN 'MAY' THEN '05'

WHEN 'JUN' THEN '06'

WHEN 'JUL' THEN '07'

WHEN 'AUG' THEN '08'

WHEN 'SEP' THEN '09'

WHEN 'OCT' THEN '10'

WHEN 'NOV' THEN '11'

WHEN 'DEC' THEN '12'

END as "MonthNo"

ORDER BY CONCAT (year,"MonthNo") DESC

This post has been answered by davidp 2 on Sep 1 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2013
Added on Sep 1 2013
3 comments
2,880 views