Newbie could use some help on a simple(?) recursive query.
From: (wrong string) �stad <paul.grostad_at_.student.uib.no>
Date: Mon, 03 Nov 2003 03:20:30 +0100
Message-ID: <oprx1h4gnqkhaz1y_at_news.uib.no>
);
Date: Mon, 03 Nov 2003 03:20:30 +0100
Message-ID: <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 - 03:20:30 CET