return top 3 fields for each row in another table

pluciorx

New member
Local time
Today, 17:03
Joined
May 28, 2009
Messages
2
Hi !
I have a 3 tables linked together:

SELECT ImeiList.[IMEI IN], SBE_LIBELLES.COMMENTAIRE AS Status, SBE_HISTOFICHES.DATECRE
FROM ImeiList INNER JOIN (SBE_HISTOFICHES INNER JOIN SBE_LIBELLES ON SBE_HISTOFICHES.VISA = SBE_LIBELLES.LIGNE) ON ImeiList.[IMEI IN] = SBE_HISTOFICHES.NUMIMEI
WHERE (((SBE_LIBELLES.COMMENTAIRE)="BER") AND ((SBE_HISTOFICHES.METIER)="1") AND ((SBE_HISTOFICHES.SITEGEO)="31") AND ((SBE_LIBELLES.ENTETE)=22));

and i want to return top 3 results from HISTOFISHES linked with LIbelles for each [IMEI IN] in ImeiList

How to perform that ?

Thanks for any advice.
 
yes but with over 8000 records it doesn't work at all :( i need a different way to do that.
 
Which method? I use the first one on a table with over 100,000 records.
 
Which method? I use the first one on a table with over 100,000 records.

Thank you Paul. I've been searching for that all morning, but wasn't using the right keywords.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom