SQL> desc tbl_mgr
Name Null? Type
----------------------------------------- --------
----------------------------
MANAGER VARCHAR2(30)
PROFILEID NUMBER(3)
PARENTID NUMBER(3)
I am running the following query on the table.
select rpad(' ',level*20,' ')||Manager manager1,parentid,profileid
from tbl_mgr
start with parentid = 0
connect by prior profileid= parentid ;
and get the following result.
MANAGER1 PARENTID PROFILEID
MSS 0 1
Bursh 1 2
O Donnell 2 617
Bursh Own 2 618
Aursh Own 2 619
Stredde 1 3
........................
........................
Now my requirement is that I want the output to be like mentioned bellow.
MANAGER1 PARENTID PROFILEID
MSS 0 1
Bursh 1 2
Aursh Own 2 619
Bursh Own 2 618
O Donnell 2 617
Stredde 1 3
I mean that for level three managers the output should be sorted by manager
name.
And I want this to be accomplished by a SQL query only..
Thanks.
Dharminder Kumar
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Kumar, Dharminder
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).