Home » SQL & PL/SQL » SQL & PL/SQL » case statement (pl/sql)
case statement [message #644221] Fri, 30 October 2015 11:42 Go to next message
amazeme
Messages: 2
Registered: October 2015
Junior Member
I have a case statement that im getting error: "ORA-00905: missing keyword"
Is there a fix or work around for this?

(case
when tos.evaluation_status = 'CXL' then ORDER_STATUS = 'OS' else tos.order_status
end) as order_status

Re: case statement [message #644222 is a reply to message #644221] Fri, 30 October 2015 11:48 Go to previous messageGo to next message
John Watson
Messages: 9003
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

Try this,
(case
when tos.evaluation_status = 'CXL' then 'OS' else tos.order_status
end) as order_status

[Updated on: Fri, 30 October 2015 11:49]

Report message to a moderator

Re: case statement [message #644223 is a reply to message #644222] Fri, 30 October 2015 12:25 Go to previous message
amazeme
Messages: 2
Registered: October 2015
Junior Member
That works!!!

Thanks!
Previous Topic: query
Next Topic: a column may not be outer-joined to a subquery
Goto Forum:
  


Current Time: Thu Jul 09 11:44:16 CDT 2026