How to get only modified column in system-versioned temporal table.
I am using SQL 2016 system-versioned temporal table to track the changes. I have the history table populated with multiple rows which include modified and not modified columns for each version of row edit.
Is there any way to get only modified column value from history row data.
Appreciated your response.
Thanks
Abdul
Advertisement
Answer
I used this approach to solve the problem.
Fetch all history and transaction records and Partitioned with Primary key.
Cross Apply the table to make row structure is Column Name and Column Value and of course other IDs like Primary Key, Partitioned Key, etc
Compare Column value based on Column Name, Primary key and Partition Key
Please let me know if any good approach.
Regards
Abdul