Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> nice 9.2 feature for hierarchical queries: sys_connect_by_path

nice 9.2 feature for hierarchical queries: sys_connect_by_path

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Wed, 20 Oct 2004 17:48:54 -0400
Message-ID: <9YWdnXI9Yb_8QOvcRVn-gg@comcast.com>


Mark Powell actually pointed this feature out in a post a while ago, but I didn't pay any attention until perusing the manual recently...

here's oracle's example:

SELECT LPAD(' ', 2*level-1)||SYS_CONNECT_BY_PATH(last_name, '/') "Path" FROM employees
START WITH last_name = 'Kochhar'
CONNECT BY PRIOR employee_id = manager_id; Path



/Kochhar
/Kochhar/Greenberg
/Kochhar/Greenberg/Faviet
/Kochhar/Greenberg/Chen
/Kochhar/Greenberg/Sciarra
/Kochhar/Greenberg/Urman
/Kochhar/Greenberg/Popp
/Kochhar/Whalen
/Kochhar/Mavris
/Kochhar/Baer
/Kochhar/Higgins
/Kochhar/Higgins/Gietz

quite a nice addition!

++ mcs Received on Wed Oct 20 2004 - 16:48:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US