Advertisement

04.30.2008 at 11:32AM PDT, ID: 23366364
[x]
Attachment Details

CONNECT BY PRIOR

Asked by JDay2 in Oracle 10.x, PL / SQL

Tags: Oracle, SQL, 10g

I have the following sql statement
SELECT     LEVEL, part_no,component_part,qty_per_assembly
      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
[+][-]04.30.2008 at 11:41AM PDT, ID: 21473446

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 11:51AM PDT, ID: 21473512

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 02:57PM PDT, ID: 21474956

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 04:04PM PDT, ID: 21475324

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 06:03PM PDT, ID: 21475792

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 11:03PM PDT, ID: 21476758

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 11:05PM PDT, ID: 21476767

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 06:55AM PDT, ID: 21478586

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 07:30AM PDT, ID: 21478942

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 08:52AM PDT, ID: 21479800

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 09:00AM PDT, ID: 21479879

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 09:10AM PDT, ID: 21479957

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 09:23AM PDT, ID: 21480083

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Oracle 10.x, PL / SQL
Tags: Oracle, SQL, 10g
Sign Up Now!
Solution Provided By: Dr_Billy
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628