>>Ok, I think I got it (hopefully). A simple query with no subqueries:
>>
>>select top 1 i1.ApprovedPersonName as FirstPerson, i2.ApprovedPersonName as LastPerson
>> from Invoice i1 inner join Invoice i2 on i2.NoClient = i1.NoClient
>> where i1.NoClient = 1
>> order by i1.AddDate, i2.AddDate desc
>>
>>
>>will give you back Michel Fournier and King Kong (I remember the days you were an extra in a movie, glad to see you now as a main character!).
>
>Thanks, this is another approach. But, is it really more simple than Message #
1609137 and/or more performant?
Simplicity would be a matter of opinion, I think... Anyway, when I ran the execution plan on the same data with these two statements in a batch and no Client table involved, it reported relative query costs of 61% for subquery approach and 39% for no subqueries. Since you have larger data at your hands you could check to see how they both escalate.
----------------------------------
António Tavares Lopes