Good Morning People; I ask for the collaboration of the community because I can not explain why the second if it is nested is not being evaluated, is not being evaluated and enters if the structure is true or false example (1 = 2) and enters? .. .
LOOP
FETCH c_cursor INTO ID_DOCUMENTO_DO, DIAS_VENCPRORRO, CON_PRORROGA, DIAS_VENCIMIENTO;
EXIT WHEN c_cursor%NOTFOUND;
IF (CON_PRORROGA > 0) then
if(DIAS_VENCPRORRO >0)then
INSERT INTO GEN_ALERTA
(DIAS_VENCIMIENTO)
VALUES (DIAS_VENCPRORRO);
end if;
ELSE
INSERT INTO GEN_ALERTA
(DIAS_VENCIMIENTO)
VALUES (DIAS_VENCIMIENTO);
END IF;
END LOOP;