in reply to Graphical Hierarchical Tree
LEVEL is a builtin Oracle variable which tells you current depth of traversal. SUB and SUPER are table columns which show which parts are subordinate to others.SELECT LEVEL, SUB, SUPER FROM PARTS CONNECT WITH PRIOR SUPER = SUB
And of course, you can use LPAD():
to "tab over" each degree of recursion. Or write your own function to create display as needed.SELECT, LEVEL, LPAD(' ', LEVEL, SUB), SUPER;
Perl is nice, but server side database preprocessing can be faster and more definitional.
|
|---|