Link to home
Create AccountLog in
Avatar of enrique_aeo
enrique_aeo

asked on

pl/sql parameter is null sometimes

i have this sp

PROCEDURE MostrarVisitaDetalle
          (k_fecha_reg in varchar2,
           k_visnrodoc in varchar2,
.
.
.
             FROM xx.ACME vs
            where vs.visfecreg >= to_date(k_fecha_reg, 'DD/MM/YYYY')
              and vs.visfecreg < to_date(k_fecha_reg, 'DD/MM/YYYY') + 1
              and vs.visnrodoc = k_visnrodoc


As I should modify the code in the where, since the parameter is sometimes NULL
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Sean Stuber
Sean Stuber

due to Boolean short circuit evaluation,  I'd recommend put the IS NULL checks on the left side of their  respective OR conditions.