Select with a CONNECT BY clause

From: Andre Careau <Andre.Careau_at_sit.ulaval.ca>
Date: 1997/12/02
Message-ID: <Andre.Careau.17.000A186F_at_sit.ulaval.ca>#1/1


Hi everyone...

In page 4-364 of 'Oracle 7 server SQL language reference manual' is a nice example of a query which returns rows indentated in hierarchical order with the CONNECT BY PRIOR clause.
SELECT LPAD(' ',2*(LEVEL-1)) ||  ENAME ORG_CHART, EMPNO,
MGR,
JOB
FROM EMP
START WITH JOB = 'PRESIDENT'
CONNECT BY PRIOR EMPNO = MGR; [Quoted] The $20.000 question is:  Is there a way to have an alphabetical order in ORG_CHART for rows in the same hierarchical level?

example:
Faulkner

  Andrews
  Collins
  Emerson

Phillips
  Brown
    Wilson
  Charles        etc.

  Thanks in advance

Andre Careau
Service de l'Informatique et des Telecommunications Universite Laval
Quebec
Andre.careau_at_sit.ulaval.ca Received on Tue Dec 02 1997 - 00:00:00 CET

Original text of this message