Thursday, March 8, 2012

Data Change

Can anybody suggest the best way I can achieve the following.
To select anybody whose surname has change in the last week, and to automatically flag a code field with "C". :cool:Hi,

Does your table have date field which is updated everytime a user updates the table?|||Yes I have found that it has a Modifcation Date field.|||Is there anyway to tell whether it is the surname that has been updated? Or could it be another field?|||Are you looking for a general solution, or is this a one-time issue?

For a general solution, you should use a trigger to stamp a datefield anytime a surname is modified.

For a one-time solution, restore a backup of your table from a week ago under a different name, and then join them on their primary keys to compare surnames.

....you do have weekly backups, right?|||if you have no record of this information,(the prior updating of the surname) you will need to create a audit column or and audit table then you can create a trigger that will indicate as such from here on out.

here are some {books online} articles you might want to look at.

Create Trigger
Alter Trigger
Programming Triggers

No comments:

Post a Comment