Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Warning: Trigger created with compilation errors.

258622May 11 2007 — edited May 11 2007
Someone can help me to undestand what is the problem in this trigger?

CREATE OR REPLACE TRIGGER Relation1_insert
BEFORE INSERT ON Relation1
FOR EACH ROW
DECLARE
num number;
BEGIN
SELECT count(*) into num
FROM Entity1, Entity2
WHERE Entity1.key1=:new.key1 AND Entity2.key2=:new.key2 AND SDO_RELATE(Entity1.geometry,Entity2.geometry,'mask=disjoint')='TRUE';
IF num=0 THEN
raise_application_error(-20001,'Vincolo topologico non rispettato!')
END IF;
END;

The problem does not depend on spatial condition because if I delete it continues to to the warning.
If I try to insert a correct or an incorrect instance of the table Relation1, Oracle does me an error on the trigger.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2007
Added on May 11 2007
8 comments
886 views