0
我有以下代碼:甲骨文案例當一個像
case when (a.je_source='Revaluation') then 'No_Location'
when d.user_name like ('SCHE%') then 'No_Location'
when d.user_name like ('C-FA%') then 'No_Location'
when d.user_name like ('C-AGO%') then 'No_Location'
when d.user_name like ('C-VD%') then 'No_Location'
when d.user_name like ('C-JL%') then 'No_Location'
else d.user_name
end as JE_User
有沒有一種方法,使之清潔?我嘗試了以下,並收到一個缺少右括號的錯誤。
case when (a.je_source='Revaluation') then 'No_Location'
when d.user_name like ('SCHE%', 'C-FA%') then 'No_Location'
else d.user_name
end as JE_User
沒有,沒有......你可以把一個或替代的所有條件,但就是這樣。 – Ben
謝謝Ben!如果有更好的方法,我想確保我使用它。 – Fenzl
不是我所知道的。 – xQbert