Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Hierarchical query
How will you differentiate between E1/E2/E3 and Salary? You need to
keep an extra field for referential keys, as to which are the parents
and which are the child nodes
RT wrote:
> I got a table with the following format:
>
> insert into tab1 (1,'E1');
> insert into tab1 (2,'E2');
> insert into tab1 (3,'E3');
> insert into tab1 (4,'Salary');
> insert into tab1 (5,'E4');
> insert into tab1 (6,'E5');
> insert into tab1 (7,'E6');
> insert into tab1 (8,'E7');
> insert into tab1 (9,'Benefit');
>
> and I want to ouput the following:
>
> E1, Salary
> E2, Salary
> E3, Salary
> E4, Benefit
> E5, Benefit
> E6, Benefit
> E7, Benefit
>
> Can anybody please help me with the query.
> Many thanks in advance.
Received on Mon Mar 21 2005 - 00:34:44 CST
![]() |
![]() |