Hi,
I'm trying to run a query that will show all the Part Numbers from a Parts table along with their corresponding Model Number (It's possible be multiple Model No's for some parts). I have one table (ModelLookup) with a Model Number and Model ID, ModelPartLink with a Model Id and Part ID and Part with Part ID and Part Number. Finally I have Part Number joined to another table (MaterialNumbers_Excel) with a Material No field that matches the Part No's. At the moment I have joined the tables by the common fields and have set the query properties to not show duplicates.
I currently get each Part Number returned against every Model No.
SELECT DISTINCT MaterialNumbers_Excel.[Old material no], Part_7_2.PartNumber, Part_7_2.PartName, Part_7_2.PartType, Part_7_2.MSRP, ModelLookUp.ModelNumber
FROM ((ModelLookUp INNER JOIN ModelPartLink_7_2 ON ModelLookUp.ModelID = ModelPartLink_7_2.ModelID) INNER JOIN Part_7_2 ON ModelPartLink_7_2.PartID = Part_7_2.PartID) INNER JOIN MaterialNumbers_Excel ON Part_7_2.PartNumber = MaterialNumbers_Excel.[Old material no];
I'm sure I'm missing something easy but I just can'rt see it ATM.
Thanks.
I'm trying to run a query that will show all the Part Numbers from a Parts table along with their corresponding Model Number (It's possible be multiple Model No's for some parts). I have one table (ModelLookup) with a Model Number and Model ID, ModelPartLink with a Model Id and Part ID and Part with Part ID and Part Number. Finally I have Part Number joined to another table (MaterialNumbers_Excel) with a Material No field that matches the Part No's. At the moment I have joined the tables by the common fields and have set the query properties to not show duplicates.
I currently get each Part Number returned against every Model No.
SELECT DISTINCT MaterialNumbers_Excel.[Old material no], Part_7_2.PartNumber, Part_7_2.PartName, Part_7_2.PartType, Part_7_2.MSRP, ModelLookUp.ModelNumber
FROM ((ModelLookUp INNER JOIN ModelPartLink_7_2 ON ModelLookUp.ModelID = ModelPartLink_7_2.ModelID) INNER JOIN Part_7_2 ON ModelPartLink_7_2.PartID = Part_7_2.PartID) INNER JOIN MaterialNumbers_Excel ON Part_7_2.PartNumber = MaterialNumbers_Excel.[Old material no];
I'm sure I'm missing something easy but I just can'rt see it ATM.
Thanks.