M_Bacheldor,
 
    Select query given below should get you the 10 oldest parts in each division. T_Parts is the name of table, having fields named Division, PartNumber, EDate (showing the date when the part in question was received) and ID (primary key).
 
Best wishes,
A.D.Tejpal
 
=================================
SELECT T_Parts.*
FROM T_Parts
WHERE ((((Select Count(*) From T_Parts As T1 Where T1.Division = T_Parts.Division And ((T1.EDate < T_Parts.EDate) Or (T1.EDate = T_Parts.EDate And T1.ID <= T_Parts.ID))))<=10))
ORDER BY T_Parts.Division, T_Parts.EDate, T_Parts.ID;
=================================
 
----- Original Message -----
Sent: Saturday, June 11, 2005 07:15
Subject: [AccessDevelopers] Top 10 by Division

I am trying to use an access query to give me a breakdown of the top 10 oldest parts by divisions. I have tried several ways but so far no good. I am hoping someone in this group can help me.



Please zip all files prior to uploading to Files section.




Yahoo! Groups Links

Reply via email to