Domanda

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');
È stato utile?

Soluzione

select *
FROM pat_register_org_det prod
where (v_variable, prod.org_code) in 
  (('K', '3'), ('KP', '3'), ('KP', '6'), ('PAK', '6'));
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top