Re: Newbie could use some help on a simple(?) recursive query.

From: nobody <nobody_at_nowhere.com>
Date: Mon, 03 Nov 2003 04:54:34 GMT
Message-ID: <eclpb.671$152.327_at_news01.bloor.is.net.cable.rogers.com>


look up CONNECT by

"Paul Gr�stad" <paul.grostad_at_.student.uib.no> wrote in message news:oprx1h4gnqkhaz1y_at_news.uib.no...
> Hi.
> I'm very new to Oracle (and databases in general), and I have a problem
> that most of you people probably will find very easy, but I just can't
> figure it out...
> I'm trying to create a "recursive" query(?) in Oracle that finds all
> PublisherPersons outranking my PublisherPerson in a direct line from his
> immediate supervisor and all the way up to the CEO.
> (Given that all persons except the CEO have a supervisor of sorts)
>
> CREATE TABLE PublisherPerson
> (
> ppersonID VARCHAR2(5) NOT NULL, <-----
> ppersonname VARCHAR2(30) NOT NULL, |
> publisherID VARCHAR2(5) NOT NULL, |
> deptID VARCHAR2(5), |
> supervisorID VARCHAR2(5), ---------------
> PRIMARY KEY (ppersonID),
> FOREIGN KEY (publisherID) REFERENCES Publisher,
> FOREIGN KEY (deptID) REFERENCES Dept
> );
>
> I really have no clue as to how I can achieve this, and I'd really
> appreciate any help you can give me!
>
> Paul
Received on Mon Nov 03 2003 - 05:54:34 CET

Original text of this message