Tree Problom In Forms [message #85315] |
Tue, 15 June 2004 20:43  |
krishna kumar shrivas
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
Dear friend hello,
I ave one table and two feilds is there request_stats & request_no ,possible value for request_stats is 'open','close' and 'partaly open/close' ('O','C' & 'P').Now i want to display all this in tree.at first level i want to display the stats of the request open(No.) and close(No) and partily(No).no. is here number of request belongs to this stats and at the second level i want to display all the request number which are belong to this stats,because i am not word with hirerichal tree so i getting diffuclt with this.Could you help me.
thanks...If you have any idea about the materials on this topic then plz inform me..
thanks
krishna kumar shrivas
|
|
|
Re: Tree Problom In Forms [message #85348 is a reply to message #85315] |
Thu, 17 June 2004 10:08  |
Nagadeep
Messages: 12 Registered: October 2002
|
Junior Member |
|
|
example:
SQL> select * from tt;
N for request #
S for Stat
N S
---------- -
1 N
2 C
3 P
4 N
5 C
6 P
> select 1,level,a||(select count(*) from tt where S=xyz.a),b
from (select a,b,b||a c from(
select s a,null b from tt
union
select to_char(n) a,s b from tt)
order by c) xyz
connect by prior a=b start with b is null
1 LEVEL A||(SELECTCOUNT(*)FROMTTWHERES=XYZ.A) B
- ----- ------------------------------------- _
1 1 C(2)
1 2 2 C
1 2 5 C
1 1 N(2)
1 2 1 N
1 2 4 N
1 1 P(2)
1 2 3 P
1 2 6 P
|
|
|