I have the following sql statement
SELECT LEVEL, part_no,component_part,qty
_per_assem
bly
FROM manuf_structure
WHERE part_no = 'UT2850-VHPOS-A' AND eff_phase_out_date IS NULL
CONNECT BY PRIOR component_part = part_no
which produces the following results.
LEVEL PART_NO COMPONENT_PART QTY_PER_ASSEMBLY
1.00 UT2850-VHPOS-A SA-PD1200-0100 1.00
1.00 UT2850-VHPOS-A 10645187 1.00
This basically the top Level of Part_no UT2850-VHPOS-A What I need is in the same table(assuming an added select statement) have component_part= part_no so it will explode other manufactured component parts within the bill of material. Too look like this
Level Part No Component Part Qty Per Assembly
1 UT2850-VHPOS-A 10645187 1
1 UT2850-VHPOS-A SA-PD1200-0100 1
2 SA-PD1200-0100 10645123 1
2 SA-PD1200-0100 10681005 2
2 SA-PD1200-0100 10681082 4
2 SA-PD1200-0100 10685003 4
2 SA-PD1200-0100 11393025 1
2 SA-PD1200-0100 11393073 2
2 SA-PD1200-0100 11393107 1
2 SA-PD1200-0100 J181 1
2 SA-PD1200-0100 Z0012 1
2 SA-PD1200-0100 11393058 1
2 SA-PD1200-0100 11029504 1
2 SA-PD1200-0100 10381153 1
2 SA-PD1200-0100 11393231 1
2 SA-PD1200-0100 10645198 1
2 SA-PD1200-0100 11606004 1
How do I produce these results via a sql statement?
Start Free Trial