Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 History data

Author  Topic 

stagedancer
Starting Member

3 Posts

Posted - 2004-12-08 : 01:33:53
Dear all,

I'm developing an internet application that uses MS-SQL server as a database.
The database contains customer information. The customer is able to create, update and detele records via forms in the application.

When a customer deletes a record I want to keep some history of the deleted record.

For the moment when a customer deletes a record the record is in fact not deleted but I update a field called "enddate" which I fill with the sysemdate.
Next time when the customer reads the information the select query will not select the "deleted" records because in my query I put "where enddate is null."

Would it be better to work with tables that have the same naming as my real data table but with an extention _HIST ?
So when a customer deletes a record it is actually deleted but via triggers inserted in the table with extention _HIST …

It concerns about 20 tables … (This will result in 20 history tables)

Any other suggestions to implement some history tracking ??

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-12-08 : 02:11:22
i go for archive into archiving table then delete into source table


--------------------
keeping it simple...
Go to Top of Page

Frank Kalis
Constraint Violating Yak Guru

413 Posts

Posted - 2004-12-08 : 03:02:55
Did you ask this question in each available online community?

--Frank
http://www.insidesql.de
Go to Top of Page

stagedancer
Starting Member

3 Posts

Posted - 2004-12-08 : 05:33:02

In some ...

The more resources the better ...

Thanks for the answers ...
Go to Top of Page
   

- Advertisement -