Pregunta

I have follow statement need be correct, when v_variable = 'KP', will go in to error. Any one can help please!

select *
  FROM pat_register_org_det prod
 where prod.org_code in
       decode(v_variable, 'K', '3', 'KP', '3, 6', 'PAK', '6');
¿Fue útil?

Solución

select *
FROM pat_register_org_det prod
where (v_variable, prod.org_code) in 
  (('K', '3'), ('KP', '3'), ('KP', '6'), ('PAK', '6'));
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top