G
Guest
I am creating a Bill of Materials application using a table that stores
parent/child relationships.
tblBOM (tableName)
Relationship_Key
Parent_ID
Child_ID
Child_Qty
The relationship can go several levels deep. I've implemented a treeview
and it works as expected. But now I have to output more data. I have to be
able to sum up quantities and determine how many can be built with current
inventory or how many of each to buy to build a requested quantity.
This can easily be accomplished with a query linking the appropriate number
of tblBOM to Parent -> Child as deep as the relationships go. However, this
is inefficient since you do not know how deep any given BOM is.
Is there a way using code to add tblBOM and then add tblBOM_1, link on
Parent (left join) to Child_1, then add tblBOM_2.... and so on until there
are no more records in the child field?
Thnks for the help
aWs
parent/child relationships.
tblBOM (tableName)
Relationship_Key
Parent_ID
Child_ID
Child_Qty
The relationship can go several levels deep. I've implemented a treeview
and it works as expected. But now I have to output more data. I have to be
able to sum up quantities and determine how many can be built with current
inventory or how many of each to buy to build a requested quantity.
This can easily be accomplished with a query linking the appropriate number
of tblBOM to Parent -> Child as deep as the relationships go. However, this
is inefficient since you do not know how deep any given BOM is.
Is there a way using code to add tblBOM and then add tblBOM_1, link on
Parent (left join) to Child_1, then add tblBOM_2.... and so on until there
are no more records in the child field?
Thnks for the help
aWs