HIER_PARENT returns the parent of either all dimension members in a hierarchy or a particular member. The hierarchy can be either level-based or value-based.
VARCHAR2
HIER_PARENT( [ member [WITHIN] ]
dimension | hierarchy)
member is a value of hierarchy whose parent is calculated. Otherwise, the parents of all members of the hierarchy are calculated.
dimension is the dimension whose members are used in the calculation.
hierarchy is a hierarchy of dimension. Otherwise, the default hierarchy is used.
The following example returns the parent of all members in the Calendar hierarchy of the Time dimension.
HIER_PARENT(GLOBAL.TIME.CALENDAR)
| Member | Parent |
|---|---|
| 2003 | null |
| Q3-03 | 2003 |
| Jul-03 | Q3-03 |
The next example returns the parent of a single dimension member in the default Fiscal hierarchy.
HIER_PARENT('Jul-03' WITHIN global.time)
| Member | Parent |
|---|---|
| Jul-03 | FY-Q1-04 |
Copyright © 2003, 2007, Oracle. All rights reserved.