-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How is your db set up? Do you have more than one table? It sounds like
you'd, at least, need a Personnel table to hold the demographic info
about customers (name, address, DOB, etc.), and a table of their
insurance contracts. E.g.:
CREATE TABLE Contracts (
person_id int not null references Personnel ,
contract_type int not null references ContractTypes ,
start_date datetime not null ,
end_date datetime null , -- null means still active
-- other columns
CONSTRAINT PK_Contracts
PRIMARY KEY (person_id, contract_type, start_date)
)
The Contracts table has a start_date & end_date, this will allow you to
make a history of the person's contracts. If you need to track
something else about a specific contract you can create another table
that has that info w/ start/end dates. That table would be a history of
changes to contracts.
Obviously, you can keep on creating tables as your specifications become
more particular. Read a good book on database design. I usually
recommend _Database Design for Mere Mortals_, by Hernandez.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQkwxioechKqOuFEgEQJ8NACfT5nai8lUYVoy/czk90lzJPB3KmYAnik1
M+1WmyhRgMGSxO6Hq7xcBBvH
=vHEx
-----END PGP SIGNATURE-----
dd*****@yahoo.co.uk wrote:
Hi all
I have a database that stores customer records and their associated
insurance details. I need to be able to track any changes made to that
record within a set time period ie if details are changed fine it is
reported next time report is run. But if details are changed more than
once in between reports then first detail change is lost.
I would like to work out a way that changes can be written to a
??seperate version of the table?? and stored in there to be reported
seperately and not just the final change as is the snapshot nature of a
report? Is this possible? Could I possible make another version of the
main table appended onto it? I feel I 'know' what I need to do but not
how to even begin it! Any help would be appreciated.