Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下语句需要正确,当 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');
select * FROM pat_register_org_det prod where (v_variable, prod.org_code) in (('K', '3'), ('KP', '3'), ('KP', '6'), ('PAK', '6'));