我想在Oracle數據庫中執行查詢。該查詢在where子句中有案例構造。Oracle - 案例在哪裏條款
where
sale.op = 2 and
case when (:stat = -11) then (sale.type_id = 27 or sale.type_id = 28 or sale.type_id = 29)
else
(sale.type_id = 27)
end
但我收到以下錯誤:
ORA-00907: missing right parenthesis.
在德比SQL這個工程。有人可以幫助我嗎? 謝謝。
CASE評估條件並返回一個「表達式」,需要使用運算符評估某個值/列。 – Incognito