0

我有以下语句需要正确,当 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');
4

1 回答 1

3
select *
FROM pat_register_org_det prod
where (v_variable, prod.org_code) in 
  (('K', '3'), ('KP', '3'), ('KP', '6'), ('PAK', '6'));
于 2013-03-22T19:46:19.340 回答