Hi
I have the following
tblProduct
ProductID PK
ProductDescription
tblConponent
ProductID PK
ParentProductID FK
Quantity
tblPrice
PriceListNameID PK
ProductID PK FK
CostPrice
PercentageMarkUp
Essentially as I understand it this is a Bill of Materials
A product/component may form part of the assembly of more that one other product/component.
Only products/components that are not assembled (ie there are no components below them in the hierarchy) have records in tblPrice
I am trying to calculate a price for any product/component. This could be at any point in the hierarchy. I'm not entirely sure that this can be done. I have Googled and researched this including Joe Celko nested tables and BOM's, however I'm afraid his SQL is way beyond my comprehension. Currently the maximum number of levels in the hierarchy of the tree that a product / component has is 5 although many have fewer that this.
Is it possible to calculate these prices and if not what is the best way to do this?
Many thanks
LouiseJ
I have the following
tblProduct
ProductID PK
ProductDescription
tblConponent
ProductID PK
ParentProductID FK
Quantity
tblPrice
PriceListNameID PK
ProductID PK FK
CostPrice
PercentageMarkUp
Essentially as I understand it this is a Bill of Materials
A product/component may form part of the assembly of more that one other product/component.
Only products/components that are not assembled (ie there are no components below them in the hierarchy) have records in tblPrice
I am trying to calculate a price for any product/component. This could be at any point in the hierarchy. I'm not entirely sure that this can be done. I have Googled and researched this including Joe Celko nested tables and BOM's, however I'm afraid his SQL is way beyond my comprehension. Currently the maximum number of levels in the hierarchy of the tree that a product / component has is 5 although many have fewer that this.
Is it possible to calculate these prices and if not what is the best way to do this?
Many thanks
LouiseJ