Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Linking to another table when using CONNECT BY / START WITH...

Re: Linking to another table when using CONNECT BY / START WITH...

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 13 Feb 2002 19:19:18 +0100
Message-ID: <tdbl6u4pjvdkht4mmvbick4atesbude5dj@4ax.com>


On 13 Feb 2002 06:42:24 -0800, m_at_ordiplan.com (Bert) wrote:

>I am using connect by / start with to extract a recurive project
>table. (projects/sub projects).
>
>Ultimately the last object that is selected from any branch is a
>document, there is always at least one document at the end.
>
>My list of documents are in another table and the last ID returned in
>from the project table is a document.
>
>Is there a was I can join the document information to the tree built
>by the connect by / start with query?
>
>What I would like is:
>
>project 1
>sub project 1
>document 1
>document 2
>sub project 2
>document 3
>document 1
>...
>
>Or do I have to build a temporary table to do the join in two steps.
>
>TIA,
>Bert

The answer to this question is version specific (the restriction has been lifted) and of course you don't post a version, as you assume there are no version differences.
You don't need a temporary table at all. You can join the connect by query by means of a subquery like this select
from table
where table.column in (select ... from tabb connect by etc.)

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Wed Feb 13 2002 - 12:19:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US