Insert Trigger
Posted in 1999
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity
Hallo,
Is there any posibility to create an trigger for insert
with an Update of one column of the table that value is not inserted:
Somthing like that:
-----------------------------
create trigger ins_customerinsert on customer
referencing new as post_new
for each row
(update post_new set number = get_number());
-----------------------------
Info: get_number is a stored procedure.
Thank you for help
Martin Fuhr
Having asked a similar question, maybe I can save Art Kagel from having to answer. Yes...but... You have to be on 7.3 and the field you're updating can't be the primary key or anything else you set prior to doing the Insert. Thus, I couldn't use a trigger in my application because I wan't the store procedure to derive a primary key for me. A non-scientific analysis would lead me to believe that Triggers and Stored Procedures have to be one of the MAJOR topics of this newsgroup. It's too bad there is not a good reference document, (with good examples) available somewhere.