Table - Employee.Status.XREF
Client Employee Date 198 Jon Doe 3/1/2009 198 Jon Doe 1/1/2009
Table - Employee.Status.History
Client Employee Date Status 198 Jon Doe 5/21/2009 T 198 Jon Doe 3/1/2009 A 198 Jon Doe 1/1/2009 P
Only query records in Employee.Status.History and Employee.Status.XREF , where Client , Employee and Date correspond.
Return only the entry from Employee.Status.History with the maximum date (on Client on Employee ) In this case, it will return
Client Employee Date Status 198 Jon Doe 3/1/2009 A
KM
source share