Re: find out data changes?

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Sun, 22 Jul 2001 06:56:15 GMT
Message-ID: <3B43240C.D093CF97_at_exesolutions.com>


Bing Du wrote:

> I'm not familiar with database maintenance on the server side.
> I get daily data feed in plain text format. My question is after
> loading the text file into the Oracle table, how can I pick out changes
> (addition/modification/deletion) between the current table and the next
> new data feed, then use the new data in the file to replace the data in
> the current table?
>
> Any hints or pointer to some doc would be appreciated.
>
> Bing

Add a field with a name such as "DATE_INSERTED" into which you insert SYSDATE (the current date) as part of your load. Then you can use query by date inserted.

For updates you could add a column such as "DATE_MODIFIED" and do the same thing.

Deletes are a larger problem. If you need to track deletes either insert them into an archive table or don't delete them but rather add a new field such as "DELETED_DATE" and just insert SYSDATE rather than removing the record. Your queries for valid data would then need to have the following added to the WHERE clause:

WHERE deleted_date is null

Daniel A. Morgan Received on Sun Jul 22 2001 - 08:56:15 CEST

Original text of this message