Yes, the modified timestamp. Actually, you only need the update trigger
because you can define the default value as current timestamp for inserts.
The tricky ones are actually the deletes because these disappear so if you
need these you need a trigger to populate a corresponding delete table.
We are slowly moving over to federated objects. These point directly to the
source data but still require a timestamp on the source data for the ETL to
work on the data warehouse.
I don't know of an easier way.
|---------+--------------------------------------------------------->
| | "McClendon Rick " |
| | <db2udbdba-ezmlmshield-x48382706.[Email Address Removed] | azyDBA.com> |
| | |
| | 01/03/2005 08:23 |
| | |
|---------+--------------------------------------------------------->
>----------------------------------------------------------------------------------------------|
| |
| To: "LazyDBA Discussion" <[Email address protected] |
| cc: |
| Subject: RE: Finding New or Modified Rows |
>----------------------------------------------------------------------------------------------|
If you find a better way (other than big $$ Replication tools) please
let me know... The triggers work but labor intensive - in most cases
I've found EXPORT/LOAD Replace to be easier.
Rick
-----Original Message-----
From: Blair Jensen
[mailto:db2udbdba-ezmlmshield-x2690636.[Email address protected]
Sent: Monday, February 28, 2005 2:00 PM
To: LazyDBA Discussion
Subject: Finding New or Modified Rows
Is there an easy way to find the new or modified rows in DB2? I'm
loading a
data warehouse and want to select only the new or modified rows from
over
500 tables. The only thing I've been able to see so far is a "last
modified" timestamp column that is updated by insert and update
triggers.
Is there an easier way? Please tell me there is.
"Attention: This message is intended only for the individual to whom it
is
addressed and may contain information that is confidential or
privileged. If
you are not the intended recipient, or the employee or person
responsible for
delivering it to the intended recipient, you are hereby notified that
any
dissemination, distribution, copying or use is strictly prohibited. If
you
have received this communication in error, please notify the sender and
destroy or delete this communication immediately."
========================================================================
======
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page