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 both Employee.Status.History and Employee.Status.XREF where Client, Employee and Date match. Return only the record from Employee.Status.History with the max date (by client by employee) In this case it would return
Client Employee Date Status
198 Jon Doe 3/1/2009 A