Tuesday, March 27, 2012

Comparing Records

Is there a Stored Procedure that compares 2 records and give you the
diffrences between them? Or do I have to manually compare each record?You will have to write one depending on what you want to compare and how you
want to retrieve the differences. For direct data comparison there are
certain 3rd party tools from companies like RedGate which you can buy off
the shelf.
Anith|||I wanted to do this from a trigger. ie see what changes there are from
the old record to the new record.|||You'd have to use the inserted and deleted tables within the trigger to do
this. Check out the topic CREATE TRIGGER in SQL Server Books Online; there
are certain examples which details how you can use them.
If you still have difficulty in coming up with a required solution, pl.
refer to www.aspfaq.com/5006 and post required information for others to
repro your problem.
Anith|||Thanks, I know how to do triggers. But you answered my question so
thanks.

No comments:

Post a Comment