LEVELS Rowset

The LEVELS rowset contains information about the levels available in a dimension. It has the following structure:

Column name Type indicator Description
CATALOG_NAME DBTYPE_WSTR The name of the catalog to which this level belongs. NULL if the provider does not support catalogs.
SCHEMA_NAME DBTYPE_WSTR The name of the schema to which this level belongs. NULL if the provider does not support schemas.
CUBE_NAME DBTYPE_WSTR Name of the cube to which this level belongs.
DIMENSION_
UNIQUE_NAME
DBTYPE_WSTR Unique name of the dimension to which this level belongs. For providers that generate unique names by qualification, each component of this name is delimited.
HIERARCHY_
UNIQUE_NAME
DBTYE_WSTR Unique name of the hierarchy. If the level belongs to more than one hierarchy, then there is one row for each hierarchy to which it belongs. For providers that generate unique names by qualification, each component of this name is delimited.
LEVEL_NAME DBTYPE_WSTR Name of the level.
LEVEL_UNIQUE_NAME DBTYPE_WSTR Unique name of the level. For providers that generate unique names by qualification, each component of this name is delimited.
LEVEL_GUID DBTYPE_GUID Level GUID. NULL if the level does not have a GUID.
LEVEL_CAPTION DBTYPE_WSTR A label or a caption associated with the hierarchy. Used primarily for display purposes. If a caption does not exist, LEVEL_NAME is returned.
LEVEL_NUMBER DBTYPE_UI4 The distance of the level from the root of the hierarchy. The root level is zero.
LEVEL_CARDINALITY DBTYPE_UI4 The number of members in a level. Note that this value can be an approximation of the real cardinality. Consumers should not rely on this being accurate.
LEVEL_TYPE DBTYPE_I4 The following bit masks are used to specify the level characteristics:
  • MDLEVEL_TYPE_REGULAR

  • MDLEVEL_TYPE_ALL

  • MDLEVEL_TYPE_CALCULATED

  • MDLEVEL_TYPE_TIME

  • MDLEVEL_TYPE_TIME_YEARS

  • MDLEVEL_TYPE_TIME_HALF_YEAR

  • MDLEVEL_TYPE_TIME_QUARTERS

  • MDLEVEL_TYPE_TIME_MONTHS

  • MDLEVEL_TYPE_TIME_WEEKS

  • MDLEVEL_TYPE_TIME_DAYS

  • MDLEVEL_TYPE_TIME_HOURS

  • MDLEVEL_TYPE_TIME_MINUTES

  • MDLEVEL_TYPE_TIME_SECONDS

  • MDLEVEL_TYPE_TIME_UNDEFINED

  • MDLEVEL_TYPE_UNKNOWN
DESCRIPTION DBTYPE_WSTR A human-readable description of the level. NULL if no description exists.

The default sort order is: CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, HIERARCHY_UNIQUE_NAME, and LEVEL_NUMBER.

Note   The LEVEL_TYPE column exists mainly as a means to transmit formatting instructions to an application. For example, a level with a type of LEVEL_TYPE_TIME_DAYS may indicate to an application that the members of the level should be expressed in text format (in other words, “Sunday,” “Monday,” “Tuesday,” and so on). LEVEL_TYPE_REGULAR can be used to signify a level that does not require any special formatting.