Subject Delete trigger trickery
Author sdbeames
G'day all,

Is there anything wrong with this trigger....

CREATE TRIGGER LEVELS_TG_BD FOR LEVELS
BEFORE DELETE
AS
begin
if (exists(select 1 from JOBS where LVL = old.LVL)) then
exception CANT_DELETE_LEVEL;
end^

The exception fires every time I try to delete a row from LEVELS,
even when there's patently no JOBS entry using that LEVEL.

Thanks,
Steve
FB 1.5.2.4731