>>You will need to use EXISTS criteria, e.g.
>>
>>
>>SELECT TOP 10 Event.RO_No,Min(Event.DateTime) AS LastUpdate
>> FROM Event
>> where exists (select 1 from RO where RO.Ro_No = Event.Ro_No)
>> GROUP BY Event.RO_No
>>
>>and then join with the RO the same way.
>> ORDER BY MIN(Event.Datetime
>
>Thanks, this is also another approach. I will take the one from Borislav for now. When I read it, it find it much simpler. Not sure however if it is more optimized.
I'm thinking it's most likely Boris approach will perform better, but I'd like you to do performance tests.
If it's not broken, fix it until it is.
My Blog