>>Uou're correct. I got confused by NoMember2 and NoMember.
>>Another query to try
>>
>>SELECT Member.Numero,Member.Nom,Member.Prenom,Member.LastAccess
>> FROM Member
>> JOIN Monitor ON Monitor.NoMember2=Member.Numero
>> WHERE Member.LastAccess >= @LastAccess
>> AND Monitor.NoMember = @NoMember
>> ORDER BY 2
>>
>
>That's what I had at first but that one was not optimized. When I changed to select the record from Monitor first, I got an immediate result. I will try the EXISTS approach. Hopefully, this will resolve the issue.
Why this was not optimized? Do you have indexes on NoMember2 and Numero ?
If it's not broken, fix it until it is.
My Blog