Sql server 2008 query
- by Prashant
I am trying to implement versioning of data
I have two tables Client and Address. I have to display in the UI, the various updates in the order in which they were made but with the correct client version
so,
Client Table Address Table
---------- ----------
Client Version Modified Date Address Version ModifiedDate
CV1 T1 AV1 T2
CV2 T4 AV2 T3
CV3 T5
My result should be
CV1 AV1 (first version)
CV1 AV2 (as AV1 was updated at T3)
CV2 AV2 (as Client got updated to CV2 at T4)
CV3 AV2 (As client has got updated at T5)