Rated 3 out of 5 stars

Trigger:

Create or replace trigger t1
after insert or update of abreise, znr
on belegung
for each row
declare
an date;
cursor otto is
Select anreise from reservierung
where znr =:new.znr;
begin
open otto;
loop
fetch otto into an;
exit when otto%notfound;
if an > :new.abreise then
raise_application_error(-20111, 'Fehler');
end if;
end loop;
close otto;
end;

This user has other reviews of this add-on.