Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Start With/Connect By problem
"Tim Arnold" <timkarnold_at_comcast.net> wrote in message
news:a96dndV75rEVjt_YnZ2dnUVZ_t6dnZ2d_at_comcast.com...
>>
> Maybe
>
> SELECT ps.PART_NO Parent, ps.Contract, LEVEL, ps.COMPONENT_PART Component,
> ps.QTY_PER_ASSEMBLY LevelQty, ps.PRINT_UNIT UOM
> FROM IFSAPP.PROD_STRUCTURE ps
> WHERE ps.CONTRACT = 'EMGA'
> START WITH ps.PART_NO = (select pspart_no where
> ORDER_NO = 'G2000132' and
> RELEASE_NO = '1' AND
> SEQUENCE_NO = '6')
> CONNECT BY PRIOR ps.COMPONENT_PART = ps.PART_NO
> order by level, ps.Part_No;
>
We may need to add "and Contract = 'EMGA'" to the sub-query since the Order No/Release/Sequence might yield two order lines with different contracts, but otherwise it's perfect! It's also embarassingly simple - I should have thought along those lines in the first place.
Thanks for a quick and accurate response.
Chris Received on Fri Oct 27 2006 - 09:22:35 CDT