Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

HIER_PARENT

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.

Return Value

VARCHAR2

Syntax

HIER_PARENT ( 
   [member_expression] [WITHIN]
   {DIMENSION dimension_id | HIERARCHY hierarchy_id} ) 

Arguments

member_expression

Identifies a single dimension member within the hierarchy used for the calculation. If this optional argument is specified, then the result does not vary across dimension members.

dimension_id

The dimension over which the values are calculated using the default hierarchy.

hierarchy_id

The hierarchy over which the values are calculated. If dimension_id is used instead, the default hierarchy is used.

Example

This example returns the parents of all members of the default hierarchy of the Time dimension.

HIER_PARENT(DIMENSION GLOBAL.TIME)

Time Parent
2006 TOTAL
Q1.06 CY2006
Q2.06 CY2006
Q3.06 CY2006
Q4.06 CY2006
JAN-06 CY2006.Q1
FEB-06 CY2006.Q1
MAR-06 CY2006.Q1
APR-06 CY2006.Q2
MAY-06 CY2006.Q2
JUN-06 CY2006.Q2
JUL-06 CY2006.Q3
AUG-06 CY2006.Q3
SEP-06 CY2006.Q3
OCT-06 CY2006.Q4
NOV-06 CY2006.Q4
DEC-06 CY2006.Q4

The next example returns EMEA as the parent of Italy within the default hierarchy of the Customer dimension.

HIER_PARENT('ITA' WITHIN DIMENSION CUSTOMER)