Subject Check in Trigger.
Author xyvy
I need to realize a trigger to grant that before delete a row, check if
it can be deleted, but I don't know how do it.

CREATE TRIGGER comprueba_fechas FOR ofertas
BEFORE DELETE
AS
DECLARE VARIABLE :nfecha_sistema;
BEGIN
SELECT CURRENT_TIMESTAMP
FROM RDB$Database INTO :nfecha_sistema;

IF (OLD.FECHA_VALIDEZ<= :nfecha_sistema) THEN
/* DOES NOT DELETE THE ROW */
ELSE
/* DOES DELETE THE ROW */
END

any idea ?