|
|
|
Re: Directed Tree using APEX [message #624637 is a reply to message #624443] |
Wed, 24 September 2014 07:12 |
Xandot
Messages: 235 Registered: January 2014 Location: India
|
Senior Member |
|
|
For Tree structure Apex provide "Tree Region" Select this region and put your query into Tree Query section.
Query Example :-
Syntax: select status, level, name, icon, id, tooltip, link from ... where ... start with... connect by prior id = pid order siblings by ...
1-You must select the columns in the following order (e.g. status, level, name, icon, id, tooltip, link..)
2-Ordering applies the order_by_clause to the siblings of the hierarchy
select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status,
ENAME as title
NULL as icon,
EMPNO as value,
ENAME as tooltip,
NULL as link
from EMP
start with MGR is null
connect by prior EMPNO = MGR
order siblings by ENAME
[Updated on: Wed, 24 September 2014 07:14] Report message to a moderator
|
|
|
|