Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question: SQL Select Technique
Larry Reid wrote:
>
> In article <32E73D4A.DFC_at_adra.se>, Roger Wernersson
> <roger.wernersson_at_adra.se> wrote:
>
> >Michael B. Klein wrote:
> >>
> >> I'm writing a web application that accesses an Oracle database, and I have
> >> an SQL question. My data is structured in the following way:
> >>
> >> B-->>B or C
> >
> >You should try using the CONNECT BY clause in you SELECT statement.
> >
> Can you use connect by to get to the last B in the list without producing
> all the intermediate Bs?
>
> --
> Larry Reid lcreid_at_web.net
I have had this problem before where the leaves in the tree was used to
fetch values from another table and the leaves could occur more than
once
in the tree but for this I used a function returning the sum.
The problem is that if you have these rows:
This Next
Then you would like to get:
A C
A C
A D
Am I correct? If you satisfy with:
A C
A D
Then it could quite easily be done using a recursive function.
-- Sport radio: people listening to people watching people having fun Mailto:roger.wernersson_at_adra.se BTW: All opinions are mine, all mine, and nobody's but mine.Received on Fri Jan 24 1997 - 00:00:00 CST
![]() |
![]() |