danbtaylor
New Member
- Joined
- Oct 1, 2013
- Messages
- 1
I am trying to break down the following 2-column table to include only each 'FinishedGood' and all its 'Inventory Parts' broken down to the 'Component' level. I want to replace each 'SubAssembly' Inventory Part with its corresponding 'Components':
Source Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Assembly Item[/TD]
[TD]Inventory Part[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component1[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]SubAssembly1[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component2[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component3[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component4[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]SubSubAssembly1[/TD]
[/TR]
[TR]
[TD]SubSubAssembly1[/TD]
[TD]Component5[/TD]
[/TR]
[TR]
[TD]SubSubAssembly1[/TD]
[TD]Component6[/TD]
[/TR]
</tbody>[/TABLE]
Desired Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Assembly Item[/TD]
[TD]Inventory Part[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component1[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component2[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component3[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component4[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component5[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component6[/TD]
[/TR]
</tbody>[/TABLE]
A FinishedGood may be comprised of a SubAssembly, a Component, another FinishedGood, or any combination of such. A SubAssembly may be part of multiple distinct FinishedGoods, and a component may be part of multiple distinct SubAssemblies
This information changes daily, and is updated through an ODBC data source, so automating the process is crucial.
I've tried creating separate tables for each stage, i.e., FinishedGoods, SubAssembly, etc., and relating them, however I've had no luck. I've also tried SQL queries to no avail.
Source Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Assembly Item[/TD]
[TD]Inventory Part[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component1[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]SubAssembly1[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component2[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component3[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component4[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]SubSubAssembly1[/TD]
[/TR]
[TR]
[TD]SubSubAssembly1[/TD]
[TD]Component5[/TD]
[/TR]
[TR]
[TD]SubSubAssembly1[/TD]
[TD]Component6[/TD]
[/TR]
</tbody>[/TABLE]
Desired Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Assembly Item[/TD]
[TD]Inventory Part[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component1[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component2[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component3[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component4[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component5[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component6[/TD]
[/TR]
</tbody>[/TABLE]
A FinishedGood may be comprised of a SubAssembly, a Component, another FinishedGood, or any combination of such. A SubAssembly may be part of multiple distinct FinishedGoods, and a component may be part of multiple distinct SubAssemblies
This information changes daily, and is updated through an ODBC data source, so automating the process is crucial.
I've tried creating separate tables for each stage, i.e., FinishedGoods, SubAssembly, etc., and relating them, however I've had no luck. I've also tried SQL queries to no avail.