Home » SQL & PL/SQL » SQL & PL/SQL » Hierachical Dynaset
Hierachical Dynaset [message #1933] Wed, 12 June 2002 01:20 Go to next message
Gus
Messages: 18
Registered: December 2000
Junior Member
Hi

I need to build an XML doc from my
dynaset, The xml doc is used to implement
and treeview and has nested elements. Is
there any way I can build a "hierachical"
dynaset similar to microsoft shape command?

thanks
Re: Hierachical Dynaset [message #1938 is a reply to message #1933] Wed, 12 June 2002 04:45 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I beleive yes ( if you are looking into something like this).
This query gives an output of names of employees based on job heirarchy of employees
SQL> column Name format a30
SQL> ed
Wrote file afiedt.buf

  1  select job,lpad(' ',5*(level-1))||ename Name
  2   from emp e
  3   connect by prior empno = mgr
  4*  start with mgr is null
SQL> /

JOB       NAME
--------- ------------------------------
PRESIDENT KING
MANAGER        JONES
ANALYST             SCOTT
CLERK                    ADAMS
ANALYST             FORD
CLERK                    SMITH
MANAGER        BLAKE
SALESMAN            ALLEN
SALESMAN            WARD
SALESMAN            MARTIN
SALESMAN            TURNER
CLERK               JAMES
MANAGER        CLARK
CLERK               MILLER

14 rows selected.
Previous Topic: Inserting subscript characters into an Oracle 8.1.7 database?
Next Topic: trigger source code
Goto Forum:
  


Current Time: Mon Apr 15 23:15:23 CDT 2024