SELECTS on hierarchical tables

Thomas Ehret@CHEDSZURICH
21.03.2000 10:53

How can I make SELECTS on hierarchical tables ?

E.g. Table EMP:


| /|
EMPNO | ENAME | JOB | MGR | HIREDATE

I want to select all rows depending on the level of the hierarchy.

Did anyone have the same problem ?


Listserv Archives (BOB member since 2002-06-25)


Listserv Archives (BOB member since 2002-06-25)

Thomas wrote:

How can I make SELECTS on hierarchical tables ?

E.g. Table EMP:


| /|
EMPNO | ENAME | JOB | MGR | HIREDATE

I want to select all rows depending on the level of the hierarchy. <

Create an alias for the table, one for each level in the heirarchy, thus for EMP right click on the table in the structure pane.
Select insert alias and make the alias MANAGER. Then just handle as if two tables.

Jonathan Bliss, Product Consultant
McKessonHBOC Computer Centre,
Harold Wood Hospital site, Gubbins Lane, Romford, RM3 0NE mobile:0498 668084, tel 01708 336135 (direct line with voicemail), fax 01708 376270


Listserv Archives (BOB member since 2002-06-25)

Create an alias for the table, one for each level in the heirarchy, thus for EMP right click on the table in the structure pane.

Fine for known number of levels but I think the question is really ‘how do I do Oracle tree walking in BusObj?’ The FHS option is one but has anyone done anything through a universe? Is the only way by using a db side function/procedure?

Regards

Jonathan

Project Leader
Group Medical, Regulatory and Product Strategy IS.


Listserv Archives (BOB member since 2002-06-25)