x
login about faq Site discussion (meta-askssc)

How to identify which fields are get updated from updated record?,

Hi, I have a record that has been updated recently. Now I want to get a particular field that has been updated in record updation, How will I get the updated field with it's old value (field value before updating)?

Thank you.

more ▼

asked May 21 '12 at 10:50 AM in Default

Bhu5han gravatar image

Bhu5han
4 1 1 3

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

If the update transaction has already happened, then your only way of finding out the old value is to either inspect the transaction logs, or to restore a copy of the data before the modification.

Going forward, you can access the values either by utilising the OUTPUT clause of the update statement, or by using DML triggers and referencing the inserted and deleted tables

more ▼

answered May 21 '12 at 12:29 PM

Kev Riley gravatar image

Kev Riley ♦♦
46.1k 39 43 69

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x113

asked: May 21 '12 at 10:50 AM

Seen: 270 times

Last Updated: May 21 '12 at 02:29 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.