Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
Please anyone say, the difference between Hierarchy and Hierarchy belongsto.....
Hope helps You
Theory:
Hierarchy is used to create an Expanded Nodes table, where each level in the hierarchy is stored in a seperate field. This makes it ideal for use in a listbox treeview, or a pivottable.
Hierarchy BelongsTo is used to create an Ancestors table, which contains one record for every child-ancestor relation found in the data. This makes it better suited for allowing selection of entire trees of data.
Sample Example:
ORGANOGRAMA:
Hierarchy(COD_DEPARTAMENT, COD_DEPARTAMENT_UP,SIG_DEPARTAMENT,SIG_DEPARTAMENT_UP,SIG_DEPARTAMENT,PATH,'/','LEVEL')
LOAD COD_DEPARTAMENT, COD_DEPARTAMENT_UP, SIG_DEPARTAMENT
INLINE [
COD_DEPARTAMENT, COD_DEPARTAMENT_UP, SIG_DEPARTAMENT
1, , COMPANY 1
2,1, DEPARTAMENT 1
3,1, DEPARTAMENT 2
4,1, DEPARTAMENT 3
5,1, DEPARTAMENT
6, , COMPANY 2
7,6, DEPARTAMENT 1
8,6, DEPARTAMENT 2
9,6, DEPARTAMENT 3
10,6, DEPARTAMENT 4
];
HIERARQUIA:
HierarchyBelongsto (COD_DEPARTAMENT, COD_DEPARTAMENT_UP, SIG_DEPARTAMENT, CODIGO, UNIDADE, HLEVEL)
LOAD
COD_UNIDADE,
COD_UNIDADE_PAI,
SIG_UNIDADE
Resident ORGANOGRAMA;
RealTime:
Hierarchy and Hierarchy Belongs to
Thank u very much