I have a situation where we record every change to a column of a member record in the MEMBER
table as a separate row. The changes that are logged only show the column name that was changed, the new value and the date the change was made.
Example: Table Name - CustomerChanges
customerId | columnName | newValue | dateChanged |
---|---|---|---|
1234 | status | Active | 1/12/2021 |
1234 | status | Cancelled | 9/30/2020 |
1234 | status | Frozen | 7/1/2020 |
1234 | status | Active | 1/1/2020 |
5678 | status | Active | 1/11/2021 |
5678 | status | Frozen | 11/1/2020 |
5678 | status | Active | 2/1/2020 |
9101 | status | Active | 1/10/2021 |
9101 | type | Full Time | 1/10/2021 |
9101 | status | Frozen | 10/15/2020 |
9101 | status | Active | 1/1/2020 |