Re: HELP sorting a table before hierarchical query

From: David Sisk <>
Date: Tue, 24 Aug 1999 20:55:42 -0400
Message-ID: <3%Gw3.1148$>


Why don't you just do the ORDER BY in the SELECT statement?

David C. Sisk
Need tech info on Oracle? Visit The Unofficial ORACLE on NT site at
Like original music?  Listen to song samples and buy a CD at

BPoulin wrote in message <7pujhk$hnu$>...

>Is there any way I can sort a table (short of completely recreating
>it,unless there is a -good- way of automating that) so that a hierarchical
>query will retrieve the information in alphabetical order (within each
>subgroup of the hierarchy)?
>The query will be
>select lpad('&nbsp',5*(level-1))||current_concept,parent_concept
>from tables.concept_hierarchy
>start with parent_concept='Concepts'
>connect by prior current_concept=parent_concept;
>This worked fine and was easy to read when I created the table using
>... as select ... order by' but after any insertions into the structure the
>ordering is lost. I've tried to copy all the records to another table,
>sorting them as I go, and then copying them back(again with 'order by') but
>the order is still lost. I've tried this in SQL*PLUS and with a cursor in a
>procedure. I've also tried using a view to sort the records before doing
>hierarchical query but this is not supported.
>The readability of the results of this query is crucial so I have to do
>somehow. I'm hoping I'm not going to have to recreate the table every time
>insert something. This will be output to a web page.
>Thanks in advance.
Received on Wed Aug 25 1999 - 02:55:42 CEST

Original text of this message