Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> sorted hierachical query - please help !
Hi all,
I develop applications for Oracle 8 in Delphi 3 with SQL-Links as frontend.
My current problem is:
I want to use a hierachical query in my application. For this I used the
"connect by prior"
clause in a select statement. Everything works fine so far. I get a
hierachical result set with "parents" and their "childs".
Now I want to have the childs in a sorted order. I added an extra
column for ordering.
But the problem is that if I use "order by" in "select...connect by
prior..." the hierachical
order is destroyed.
Oracle documentation says this also but gives no advice to solve
this kind of problem.
Please help !!!!
I already tried to work around with auto-joins, but these statements
look horrible
and the max. depth of the resulting tree depends directly from the
statement.
Unfortunately I do not know how big the the depth will grow.
Is there any possibility to manage ordered hierachical queries with oracle ?
By
Stephan Received on Sat Apr 18 1998 - 16:46:32 CDT