Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have a Customer table and from this table I would like to create a hierarchy like
CustomerClass >> Region>>Area >> Branch.
I have attached sample data.
Thanks
Check accordingly
ORGANIZATION:
LOAD * INLINE [
CustomerClass, Region, Area
Distributors, West, NBL Central
Distributors, Kampala, NBL West
Distributors, West
Distributors, West, NBL Central
Distributors, West, NBL West
Export, West, NBL West
Export, Kampala, NBL West
Export, Kampala, NBL Central
];
TREE_VIEW:
LOAD Distinct CustomerClass as VALUE, CustomerClass & '-ROLE' as NODE_ID, Region & '-REPORTINGMANAGER' as PARENT_NODE_ID resident ORGANIZATION;
LOAD Distinct Region as VALUE,Region & '-REPORTINGMANAGER' as NODE_ID, Area & '-LEVELOFBUSINESSHEAD' as PARENT_NODE_ID resident ORGANIZATION;
LOAD Distinct Area as VALUE,Area & '-LEVELOFBUSINESSHEAD' as NODE_ID, Area & '-LEVELOFBUSINESSHEAD' as PARENT_NODE_ID resident ORGANIZATION;
HIERARCHY_TABLE:
Hierarchy(NODE_ID_H,PARENT_NODE_ID_H, ID, PARENT_NAME, NAME, Organization_Structure) load
NODE_ID,
NODE_ID as NODE_ID_H,
PARENT_NODE_ID as PARENT_NODE_ID_H,
VALUE as ID,
VALUE as NAME
resident TREE_VIEW;
Thanks Anil for your response, but I also need to find out about section access?
You may search on google. You will get number of threads and Docs related one. Start writing or copy paste same code on your hierarchy then look on it