on 2016 Sep 06 3:05 PM
We have a BOM (Bill of material) table according below...
Now it has been found that the material included in itself in certain components and subcomponents. See below what I mean. This is not valid and makes some recursive SQL does not work. My question is how through SQL can identify which materials are included in itself as a component. It may be a level 1 or 2 or less that they can be included.
Ex:
Material--------Component-------Quantity--------Materialtype
A---------------B---------------1---------------M
A---------------C---------------2---------------M
A---------------D---------------1---------------M
B---------------E---------------1---------------P
B---------------F---------------2---------------P
C---------------A---------------1---------------P --->Invalid
C---------------G---------------1---------------P
D---------------D---------------1---------------P --->Invalid
D---------------H---------------2---------------P
H---------------A---------------1---------------P --->Invalid
H---------------I---------------1---------------P
Request clarification before answering.
User | Count |
---|---|
54 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.