Question on Triggers/Stored Procedures
Posted in 1993
Informix users: I have a problem I think can be solved with stored procedures or triggers. We use Informix OnLine linked with Wingz to support a budget-tracking system. At different times in the budget process, several users of the system update a particular table in the database with revised budget figures. Then another user, responsible for consolidating the budget figures, reads the revised figures from the same table. What I'd like to do is attach a stored procedure or trigger to this table which would send an e-mail message to the "consolidation" user each time his subordinates update their section of the table. This would allow the consolidation user to know when the table is full, thus eliminating the current situation where he either 1) iteratively reads the table until he sees that all the data has been updated; or else 2) relies on his subordinates to notify him when they have updated the table. Automated notification would be a nice enhancement to the system. I seem to recall a similar situation described in a session on stored procedures at the User Conference in July. We're running Online 4.10 on a SunSparc2 running SunOS 4.1.3. The standard UNIX mail program is running on the Sparc. So, my questions are: 1. Are stored procedures or triggers applicable to the problem I've described? 2. If not, are there other options which are applicable? 3. If so, I'd preferably like the text of the mail message to include the name of the user and the date/time that the table was updated. Are there environment variables I could use to do this? Being more of a HyperScript front-end person, I don't know where to start with stored procedures. Thanks in advance for any advice! Brian O'Sullivan | e-mail: bosulliv@mitre.org MITRE Corp., Washington DC | Space Program Engineering | ** my opinions, not MITRE's **