Detect hierarchy loops with Oracle 10g's new hierarchy pseudocolumns

Thursday Jan 25th 2007 by Staff

Hierarchical queries sometimes fail because the data contain rows that reference each other: a loop. Oracle 10g has syntax and two new pseudocolumns to aid in finding such loops.


In a previous tip, I described how to sort the entries in a hierarchical query. For a hierarchical query to work, however, the data must not loop back upon itself. That is, a parent row may not list itself or one of its child rows as its own parent. If this were the case, Oracle could follow the links around and around, never coming to a definitive end.

The article continues at

Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved