Unanswered: How to Create a Trigger with Atomic option in DB2UDb in windows
i have created 2 databases and created link between those 2 dbs using federated db.
now i want to create a trigger that, if i insert a row in client table which is in db2, then it should check the master table whichis in db1.
i tried to create trigger but it is not working.
i can select the rows using join from those tables residing in diff dbs.
pls help me out how to create a trigger fo r this Db2Udb in windows
Originally posted by ARWinner
Did you create a wrapper for the master table in database db2? If so what name did you give it? Could you also post the trigger definition that you are trying to create?
its worked now,
this is the trigger i created
CREATE TRIGGER Test1 no cascade before insert ON emp1 REFERENCING NEW AS N FOR EACH ROW MODE DB2SQL WHEN (deptno NOT IN (SELECT deptno FROM dept)) SIGNAL SQLSTATE '75000' ('Referencial integrity Error before insert')