我跟随声明需要正确,当v_variable ='KP'时,将进入错误状态。任何人都可以帮忙!
select *
FROM pat_register_org_det prod
where prod.org_code in
decode(v_variable, 'K', '3', 'KP', '3, 6', 'PAK', '6');
答案 0 :(得分:3)
select *
FROM pat_register_org_det prod
where (v_variable, prod.org_code) in
(('K', '3'), ('KP', '3'), ('KP', '6'), ('PAK', '6'));