Why can’t I remove some old Product Category Codes?
I have 4 product categories in the look-up table that I do not think I am using but I can’t delete because “related data exists”. Is there a query I can run to see what brand(s) and part(s) these codes are linked to? The codes are :
400802, 500706, 500707
The following query will show the part numbers using those product category codes (also known as Category Management codes or PIES element B62):
select b.BrandNm, pb.PartNumber, pm.ProductCategoryCD
from PartBrand pb, Brand b, PartMaster pm
where b.BrandID = pb.BrandID and pb.PID = pm.PID
and pm.ProductCategoryCD in ('400802', '500706', '500707')
As long as the parts are in the database and using the codes, they need to stay to maintain the history.
Revised: 2023-11-01
Copied!