Compare current and previous record [message #670187] |
Fri, 15 June 2018 08:52 |
|
Danny Freeman
Messages: 21 Registered: December 2015 Location: UK
|
Junior Member |
|
|
Want to compare current and previous record and log column changes. There are 15 columns. Really want to avoid comparing each column and need to write a generic logic. I am using triggers but I have to compare each column either by taking it in a variable or maybe a cursor. But really want to avoid such a complex process in a trigger.Please help
[Updated on: Fri, 15 June 2018 08:56] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Compare current and previous record [message #670221 is a reply to message #670196] |
Tue, 19 June 2018 12:55 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Danny Freeman wrote on Fri, 15 June 2018 10:58That's what I'm saying. If it's an insert trigger and I want to compare previous record and current record s columns and if there's a change from previous row, I want to log that column's value.
What is the previous record, for the 4th time?
|
|
|
|