Re: Historical data; how?
From: Anton Versteeg <av_at_nll.ibmm.com>
Date: Fri, 17 Jan 2003 16:51:05 +0100
Message-ID: <3E282669.97970FF4_at_nll.ibmm.com>
Date: Fri, 17 Jan 2003 16:51:05 +0100
Message-ID: <3E282669.97970FF4_at_nll.ibmm.com>
Perhaps the following:
Create a history table that contains all the columns of the table you want
keep a history of. Make the columns nullable.
Then create a trigger that is invoked after an update and that inserts the
old values
into the history table. If a column didn't change then a NULL is inserted.
Karel Miklav wrote:
> Hi folks,
>
> I have some tables, where I should remember histories of every column.
> Ie. I should track how a person's (licence id) changes over time and be
> able to find him later by any of his (licence ids) shown. I could create
> related tables for _every_ column but... there must be a better way?
>
> Thanks, Karel Miklav
-- Anton Versteeg DB2 Specialist IBM NetherlandsReceived on Fri Jan 17 2003 - 16:51:05 CET
