Oracle Magazine, Jan/Feb 2018
Database Developer and DBA ETL To avoid this loop and error there is a NOCYCLE extension to the CONNECT BY syntax With NOCYCLE CONNECT BY will traverse the hierarchy as much as possible Listing 5 shows NOCYCLE in action preventing an infinite loop and not generating an error in the SQL execution Code Listing 5 NOCYCLE prevents infinite loop and error SQL select sys_ connect_ by_ path ename 2 from emp 3 start with mgr is null 4 connect by NOCYCLE prior empno mgr 5 ORACLE MAGAZINE JANUARY FEBRUARY 2018 94 SYS_ CONNECT_ BY_ PATH ENAME KING KING JONES KING JONES SCOTT KING JONES SCOTT ADAMS KING JONES FORD KING JONES FORD SMITH KING BLAKE KING BLAKE ALLEN KING BLAKE WARD KING BLAKE MARTIN KING BLAKE TURNER KING BLAKE JAMES
You must have JavaScript enabled to view digital editions.