Sql server 2008 query

Posted by Prashant on Stack Overflow See other posts from Stack Overflow or by Prashant
Published on 2010-06-15T16:29:17Z Indexed on 2010/06/15 16:32 UTC
Read the original article Hit count: 246

Filed under:

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)  

© Stack Overflow or respective owner

Related posts about sql-server-2008