SQL conect by prior and group by

From: Ben Van Hool <ben_at_webrider.be>
Date: 1996/02/10
Message-ID: <4fgcr5$3kg_at_news.Belgium.EU.net>#1/1


I have a database like:

id	number
name	varchar2
parent	number

using the following SQL statement I get the hierarchical structure fine:

SELECT name FROM MYTABLE START WITH id=1 CONNECT BY PRIOR id=parent

Now, how can I get this structure in alphabetical order (preserving the hierarchy of course)?

When I put a _GROUP BY name_ behind the above statement, the hierarchy gets totaly mixed up again.

TIA, Ben. Received on Sat Feb 10 1996 - 00:00:00 CET

Original text of this message