Currently I have a table with the following columns and data
Id | Revision | Name | Desc | Status | Schema | CreatedBy |
---|---|---|---|---|---|---|
First | row | 123 | xyz | new | 1 | person1 |
Second | row | 123 | abc | modified | 1 | person2 |
I am attempting to compare the rows of this table by column values and output the result to a temporary table that shows what data was been changed (from the row above):
Column | Value |
---|---|
Id | Second |
Desc | abc |
Status | modified |
CreatedBy | person2 |
When data is common between the two rows there is no need to add to the temporary table but when data is modified from the row above the modified values get added to the output table along with their column names.
Any help getting started on the code for this functionality would be greatly appreciated!