917122533539
Programmer
HI,
I am facing some problems while writting database trigger in
Firebird database.
My basic requirement is to insert record into table on which i am
writing update trigger.
In Oracle i have written row leve trigger and statment level
trigger
to achieve this.
Ex :
Say I want to insert record into TABLE1 on update of same table.
on update of TABLE1 i am going to insert record in PL/SQL package
.
which will be used to AFTER UPDATE STATEMENT LEVEL trigger on same
table to insert record into TABLE1.
Same thing i want in interbase/Firebird. I would like to know how
it can be acheived?
I have tried in interbase by writing
AFTER UPDATE TRIGGER on TABLE1 and tried to insert record with old
values on TABLE1
Ex:
create trigger upd... for TABLE1 ...
AFTER UDPATE..
BEGIN
INSERT INTO TABLE1 VALUES(OLD.N, OOLD.NAME);
END
But on update of TABLE1 it goes on updating and never terminate.
May be it goes into infinite loop. Ultimately i have to stop the
firebird service . otherwise it go on increasing database file
size.
I would highly appreciate if you can suggest me any good
solution.
I am facing some problems while writting database trigger in
Firebird database.
My basic requirement is to insert record into table on which i am
writing update trigger.
In Oracle i have written row leve trigger and statment level
trigger
to achieve this.
Ex :
Say I want to insert record into TABLE1 on update of same table.
on update of TABLE1 i am going to insert record in PL/SQL package
.
which will be used to AFTER UPDATE STATEMENT LEVEL trigger on same
table to insert record into TABLE1.
Same thing i want in interbase/Firebird. I would like to know how
it can be acheived?
I have tried in interbase by writing
AFTER UPDATE TRIGGER on TABLE1 and tried to insert record with old
values on TABLE1
Ex:
create trigger upd... for TABLE1 ...
AFTER UDPATE..
BEGIN
INSERT INTO TABLE1 VALUES(OLD.N, OOLD.NAME);
END
But on update of TABLE1 it goes on updating and never terminate.
May be it goes into infinite loop. Ultimately i have to stop the
firebird service . otherwise it go on increasing database file
size.
I would highly appreciate if you can suggest me any good
solution.