I'm working with a Bill of Material table. Want to know if there is a way I could get a components Top Level parent.
Table Name: BOM
I'm using dashes as spaces to try and keep things lined up. The Code tag doesn't seem to work like it did on the old site.
Parent_Item --- Comp_item ------ Qty per
ABC--------------- 123 ------------------- 5
123 ----------------GKS------------------8
GKS ---------------GLS------------------2
what I'm looking to do is for all comp_items that start with GLS I want to find the top level parent. in the example above I would return ABC and it would be great if I could get the Qty needed of GLS which would be 582 = 40