› Fóruns › SQL e PL/SQL › If ou Case dentro do where ??? › If ou Case dentro do where ???
27 de dezembro de 2006 às 9:57 pm
#77987
Participante
Você pode tentar assim:
select *
from MinhaTabela mp
where ((v_nr_cliente 0 and mp.nr_cliente = v_nr_cliente) or
(v_nr_cliente = 0 and mp.dt_atual = sysdate ))