Pular para o conteúdo

Fóruns SQL e PL/SQL If ou Case dentro do where ??? If ou Case dentro do where ???

#77987
spernega
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 ))