Hello everyone,
I have a parent child relationship table. Using which I created another table with levels, cost and qty.
Now I am trying to create a recursive query to calculate the cost for part/assembly at Level 1.
P4 at level 3 has S2,S3 and P5 as child. So sum(cost*qty) for P4 at level 3 is $200.
P4 at level 2 is child of P2 and has it's individual cost of $3.
Also, all real data is on a different production server, so I can't share it. Apologies.
Also to add, I have close to 30K parts/child relationship in my database.
So intention behind creating levels was to save time.
I hope I have shared all required information.
In case you need more details please let me know.
Thank you.