Case statement in oracle with comparision in Then clause

冷暖自知 提交于 2019-12-11 21:26:17

问题


I am new to using Oracle trying something similar to below code, but unable to accomplish the task.

CASE
WHEN Dimension='abc'
then value=100
When Dimension='def'
then Value between 200 and 300
end

but it is throwing error Missing Keyword state

Please help me to solve this issue


回答1:


You can rewrite your where clause this way.

(Dimension='abc' and value=100)
or 
(Dimension='def' and value between 200 and 300)


来源:https://stackoverflow.com/questions/19534054/case-statement-in-oracle-with-comparision-in-then-clause

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!