Below is the SQL of a query I have. I have linked three tables at the PartNumber level. What I am trying to get is
a unique PartNumber. I added Distinct beofre the first SpedListTrackingTBL.PartNumber but that did not help. I realize that duplicate PartNumbers might have different other Fields associated with it but regardless of the other Fields I would like to see each PartNumber only once with the earliest Due Date associated to it. Any suggestions as how to accomplish this? Thanks for your help!
a unique PartNumber. I added Distinct beofre the first SpedListTrackingTBL.PartNumber but that did not help. I realize that duplicate PartNumbers might have different other Fields associated with it but regardless of the other Fields I would like to see each PartNumber only once with the earliest Due Date associated to it. Any suggestions as how to accomplish this? Thanks for your help!
Code:
SELECT SpedListTrackingTBL.PartNumber, Prmspm.Description, MRP.[Due Date], SpedListTrackingTBL.MastAssy, SpedListTrackingTBL.[One-ThreeTon], SpedListTrackingTBL.[Four-SevenTon], SpedListTrackingTBL.[Seven-NineTon], SpedListTrackingTBL.Fab, SpedListTrackingTBL.Paint, SpedListTrackingTBL.MastWeld, SpedListTrackingTBL.Machine
FROM Prmspm INNER JOIN (MRP INNER JOIN SpedListTrackingTBL ON MRP.[Part Number] = SpedListTrackingTBL.PartNumber) ON Prmspm.[Part Number] = SpedListTrackingTBL.PartNumber
ORDER BY MRP.[Due Date];