问题
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