| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Connect By query question
Oracle 8.1.7:
My current query and results:
select LPAD(' ', 2*(level-1), '-') || display CategoryDisplay, cat_id
from category
start with cat_id = 50000095
connect by prior cat_id = parent_cat_id;
Results:
- Inside Sales 50000117
----- monitors 50000503 ----- printers 50000502 ----- computers 50000504 ----- Keyboards 50000505
- Outside Sales 50000118
GOAL : I am trying to alphabetize each level of the tree so that it would come out looking like:
SALES DEPT 50000095
- Computer sales 50000461 - Inside Sales 50000117
----- computers 50000504 ----- Keyboards 50000505 ----- monitors 50000503 ----- printers 50000502
- Outside Sales 50000118
Question : How do you order just the level within the tree ????
Thanks,
Sean Dolan
Received on Thu May 17 2001 - 11:25:56 CDT
![]() |
![]() |