|
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; =================================
Please zip all files prior to uploading to Files section. Yahoo! Groups Links
|
