Triggers
Posted in 2006
Topics: Triggers, Constraints & Referential Integrity
Hi Help please, having some issue with some development tha invilves the creation of triggers. Problem 1: Informix does not allow more than trigger per event. I need two. Basically I have insert/update and delete triggers for a table. These triggers insert a few columns from that table into another. No Problem. I also need some colunms to be inserted into another table. Know how? Would help a lot if I got some pointers. Problem 2: Informix does not allow triggers on tables referenced with referrential integrity. WHat I am trying to do is should a change happen to a table, I want a trigger to insert a copy of that row into another table in another database. Simple, but it wont let me creat the triggers. Suggestions? Thanks
Have you considered writing a stored procedure called by the trigger action you need to check? Take care. Clifton -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of STEVE RITCHIE Sent: Wednesday, September 13, 2006 9:32 AM To: ids@iiug.org Subject: Triggers [7454] Hi Help please, having some issue with some development tha invilves the creation of triggers. Problem 1: Informix does not allow more than trigger per event. I need two. Basically I have insert/update and delete triggers for a table. These triggers insert a few columns from that table into another. No Problem. I also need some colunms to be inserted into another table. Know how? Would help a lot if I got some pointers. Problem 2: Informix does not allow triggers on tables referenced with referrential integrity. WHat I am trying to do is should a change happen to a table, I want a trigger to insert a copy of that row into another table in another database. Simple, but it wont let me creat the triggers. Suggestions? Thanks **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
Steve, problem 1: I use stored procedure a lot. the trigger just run a stored procedure which do everything I need. I have just one trigger per event. problem 2: If the other database is within the same instance there are no problem, but if the other database is in another instance and machine you should use replication (cdr). best regards, Celso Coimbra -----Mensagem original----- De: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org]Em nome de Clifton Bean Enviada em: quarta-feira, 13 de setembro de 2006 11:45 Para: ids@iiug.org Assunto: RE: Triggers [7455] Have you considered writing a stored procedure called by the trigger action you need to check? Take care. Clifton -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of STEVE RITCHIE Sent: Wednesday, September 13, 2006 9:32 AM To: ids@iiug.org Subject: Triggers [7454] Hi Help please, having some issue with some development tha invilves the creation of triggers. Problem 1: Informix does not allow more than trigger per event. I need two. Basically I have insert/update and delete triggers for a table. These triggers insert a few columns from that table into another. No Problem. I also need some colunms to be inserted into another table. Know how? Would help a lot if I got some pointers. Problem 2: Informix does not allow triggers on tables referenced with referrential integrity. WHat I am trying to do is should a change happen to a table, I want a trigger to insert a copy of that row into another table in another database. Simple, but it wont let me creat the triggers. Suggestions? Thanks **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.