Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

question on start with ... connect by prior syntax

443806Jan 5 2007 — edited Jan 24 2007
I have a situation that represents a bill-of-material. It has three columns - downstream part, upstream part, quantity_per. For example, rows in it would be like this:

car chassis 1
car wheel 4
wheel tire 1
wheel nut 4

It is easy to extract an indented bill of material using the start with ... connect by prior... syntax.

I have a slightly more involved problem. I want to figure out that for a car, I need 16 nuts (i.e. at the leaf-level node). That is, I want to multiply and accumulate values of specific columns. Can this be done using the recursive SQL? I want to avoid having to write PL-SQL.

Thanks,

Regards,

Srini
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2007
Added on Jan 5 2007
10 comments
1,455 views