Re: Deleting the record that triggers an action?
Posted in 1996
Stephen R. Garner wrote: > > Hi there. > > Is is possible to set up an Insert trigger in Informix to > allow the record that caused the trigger to fire to be deleted > as the last action of the trigger? > > I have a situation where a transition table gets a record inserted > into it and that record is then formatted and copied into another > table. At the end of that process I'd like to delete the record > from the transition table. > I think you're out of luck. You can't affect the inserting row, either by changing columns or deleting. You could RAISE EXECPTION, but that would roll back all the other work. Best you could do (and I'm not reccommending it) is to call a stored procedure that does SYSTEM on a seperate 4GL (or other) program that deletes the row. Since this would be a seperate online process, it wouldn't be the same transaction. //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 5299 DTC Blvd Suite 740 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-843-6408 and do not necessarily //////////////// http://www.informix.com reflect those of my employer