Re: hierarchical tree

From: Martin Burkert <martin.burkert_at_a1plus.at>
Date: Fri, 14 Jun 2002 12:16:43 +0200
Message-ID: <aecg0j$t7t$1_at_fstgss02.tu-graz.ac.at>


> Just try to do an union:
>
> select decode (level, 1, 1, 1),LEVEL, lower_comp, NULL, lower_comp
> from composition
> start with upper_comp = 'comp1'
> connect by prior lower_comp = upper_comp
> union
> select dummy_value, dummy_value, dummy_value, dummy_value, dummy_value
> from dual
>
Thanks for your reply. This was one of my first tries to solve this problem, but the problem is, that the "union" - Operator sorts the data => the hierarchical tree from oracle forms is not in the right relation.

for example

select decode (level, 1, 1, 1),LEVEL +1 , lower_comp, NULL, lower_comp from composition
start with materialnr = 'comp1'
connect by prior lower_comp = upper_comp union
select decode(1,1,1,1) , 1, 'comp1', NULL, 'comp1' from dual

the output is now sortet by the level! In my example above that is ok, because comp2 has no components in its self, but when comp2 include comp2a:

level comp

1        comp1
2        comp2
2        comp3
3        comp2a

.......
[Quoted] and this is defenitly false (Forms interpretes this like comp 2a is built in into comp3).

greetings Martin Received on Fri Jun 14 2002 - 12:16:43 CEST

Original text of this message