× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I was thinking a trigger also, and if you specify TRGUPDCND(*CHANGE), there'd be no need to compare buffers.



-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx]
Sent: Wednesday, June 11, 2014 8:26 AM
To: Midrange Systems Technical Discussion
Subject: Re: DB2 Auto-update TimeStamp

Anything's possible given enough time and money.

Instead of something as simple and easy as what you've posted you could always create a trigger that would compare the before and after buffer, and, if they differ, modify the change timestamp in the after buffer.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Ricky Thompson <rickyt29@xxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Date: 06/11/2014 09:11 AM
Subject: DB2 Auto-update TimeStamp
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



I know you can add a timestamp to a table that automatically updates on
insert and update. But can you have it only update if there is a real
change in the data? For example if a update is done to the table but no
data changes I would like for it not to update the timestamp. My guess is
no it's not possible but thought I would ask.


myTimeStamp TIMESTAMP NOT NULL GENERATED BY DEFAULT
FOR EACH ROW ON UPDATE AS
ROW CHANGE TIMESTAMP

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.