[OldPartNumber]
-----
OldPartID
ModelNo
[ModelNumber]
-----
ModelID
ModelName
ModelReplaced
ProductType
Dimensions
[NewPartNumber]
----
NewPartID
OldPartID
[SKUs]
----
SKUID
BrandID
[BrandName]
-----
BrandID
BrandName
IsRelavent
[ProductTypes]
-----
ProductTypeID
ProductTypeName
[XRef]
SKUID
OldPartID
[NewXRef]
NewPartID
OldPartID
....
What I want to do is join the data so that I can bring in Model Name, Model Replaced, Model Dimensions, Product Type Name, Brand Name, SKU#, and New Number.
SELECT ProductLines.ProdcutLineName, BrandName.BrandName, XRef.SKUNo, XRef.OldPartID, NewPartNumber.NewPartID, ModelNumbers.ModelName, ModelNumbers.ModelReplaced, ModelNumbers.Dimensions FROM ((BrandName INNER JOIN SKUs ON BrandName.BrandNameID = SKUs.BrandID) INNER JOIN (ProductLines INNER JOIN (ModelNumbers INNER JOIN (OldPartNumber INNER JOIN XRef ON OldPartNumber.OldPartID = XRef.OldPartID) ON ModelNumbers.ModelID = OldPartNumber.OldPartName) ON ProductLines.ProductLineID = ModelNumbers.ProductLineID) ON SKUs.SKUNo = XRef.SKUNo) INNER JOIN NBXRef ON OldPartNumber.OldPartID = NewXRef.OldPartID ORDER BY ProductLines.ProdcutLineName, XRef.SKUNo;
This returns 110 records, I modded it slightly by using 2 different queries for the XRef links, but that returned only 139 lines. I don't have the modification any more because when it failed I removed the query.
Thanks for your help.

New Topic/Question
Reply



MultiQuote





|