你好,请问如下select case when 这个哪里写错了,为什么运行不出来值?
select a.p58_seq Chasu,
case a.p58_chasu
when in ('1','2') then 'Bottom'
when in ('3','4') then 'Top'
when in ('5','6') then 'Acc'
End,
a.p58_size01cnt
谢谢!
------解决思路----------------------
case
when a.p58_chasu in ('1','2') then 'Bottom'
when a.p58_chasu in ('3','4') then 'Top'
when a.p58_chasu in ( '5','6') then 'Acc'
End,
------解决思路----------------------
select case when a.p58_chasu in ('1','2') then 'Bottom'
when a.p58_chasu in ('3','4') then 'Top'
when a.p58_chasu in ('5','6') then 'Acc'
end Chasu
from table_name
------解决思路----------------------
case 变量
when
when
end
是PLSQL的用法,不适用SQL