RE: Finding out when a row in a table was last changed.
Posted in 2004
Andrew Create an update trigger on the table that writes out the primary key and a timestamp to a separate table. It can be programmed to only output when the target field is changed, or whenever the whole record is updated. This should be totally invisible to the application, is totally within the engine and is available for all engine versions. Keith -----Original Message----- From: Andrew Hardy [mailto:Andrew.Hardy@marconi.com] Sent: Thursday, September 23, 2004 15:42 To: informix-list@iiug.org Subject: Finding out when a row in a table was last changed. I need to know when a (field in a) row in a table was last updated, but I want to avoid adding a timestamp field to the table for reason of software version enhancement and fallback issues. Does any one know of a fairly efficient inherent informix feature that I could use to achieve this? Can it be turned on in queries or on creating/altering parts of the existing schema per table, or even per column if possible ? I cannot make changes to the server's configuration. Even if it could be turned on by adding a constraint or something. It may create few enhancement/fallback issues if left in a version of the database accessed by an earlier version of the software that didn't make use of the feature, apart from a performance issue trhat would be in the future versions anyway. Many thanks, Andrew. sending to informix-list ********************************************************************************** This message is sent in strict confidence for the addressee only. It may contain legally privileged information. The contents are not to be disclosed to anyone other than the addressee. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. This footnote also confirms that this email message has been swept for the presence of computer viruses, however we cannot guarantee that this message is free from such problems. ********************************************************************************** sending to informix-list