Re: insert ROW LEVEL trigger question
Posted in 1995
> nigelc@Cognos.COM (Nigel Campbell) writes: > I cannot tell from the Online 7.x docs if I should be able to setup a row > level insert trigger which assigns values to columns of the inserted row > via calls to a stored procedure. As along the lines of execute procedure > blat ... into col1, col2... in an update trigger. > > Ideas? > > -- > Nigel Campbell Voice: (613) 738-1338 ext 3016 P.O. Box 9707,Stn.T > Business Intelligence FAX: (613) 738-0002 3755 Riverside Dr. > Cognos Incorporated Internet: nigelc@cognos.com Ottawa ON K1G 4K9 > URL: http://www.cognos.com CANADA > >>>> The DB engine will not let you change the values of any field in an insert trigger. To go around this, I have a dummy field called newindicator in every table. Instead of putting stuff in the insert trigger, I make sure that my applications always update the newindicator field after the insert and I have an update trigger on change of newindicator. Informix was probably trying to protect us (dumb DB designers) and they probably spend a lot of time making sure that the trigger will not over-write the new values. You should be thankful for that :-). Bashar Chalabi Card Tech Ltd