Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

Part Number 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
OLAXS232

HIER_LEVEL

HIER_LEVEL returns the level of either all members of a hierarchy or a particular member. The hierarchy must be level-based.

Return Value

VARCHAR2

Syntax

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

Arguments

OLAXS233member_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.

OLAXS234dimension_id

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

OLAXS235hierarchy_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 level of each member of the default hierarchy of the Time dimension.

HIER_LEVEL(DIMENSION "TIME")

Time Level
2006 CALENDAR_YEAR
Q1.06 CALENDAR_QUARTER
Q2.06 CALENDAR_QUARTER
Q3.06 CALENDAR_QUARTER
Q4.06 CALENDAR_QUARTER
JAN-06 MONTH
FEB-06 MONTH
MAR-06 MONTH
APR-06 MONTH
MAY-06 MONTH
JUN-06 MONTH
JUL-06 MONTH
AUG-06 MONTH
SEP-06 MONTH
OCT-06 MONTH
NOV-06 MONTH
DEC-06 MONTH

The next example returns ACCOUNT as the level of Business World in the Market hierarchy of the Customer dimension.

HIER_LEVEL('BUSN WRLD' WITHIN HIERARCHY CUSTOMER.MARKET)

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF