AreMemberKeysUnique (Level Interface)

[!NOTA]

  Questa caratteristica verrà rimossa a partire dalla prossima versione di Microsoft SQL Server. Non utilizzare questa caratteristica in un nuovo progetto di sviluppo e modificare non appena possibile le applicazioni in cui è attualmente implementata.

The AreMemberKeysUnique property of the Level interface indicates whether the members of a level can be uniquely identified within the dimension by their member key column and without a reference to a higher level.

Applies To:clsAggregationLevel, clsCubeLevel, clsDatabaseLevel, clsPartitionLevel

Data Type

Boolean

Access

Access depends on the value of the ClassType property of the object.

Class type

Access

clsDatabaseLevel

R/W*

clsCubeLevel

R

clsPartitionLevel

R

clsAggregationLevel

R

* For more information about read/write access, see Remarks later in this topic.

Osservazioni

For objects of ClassType clsDatabaseLevel, the AreMemberKeysUnique column is read-only if the object meets one of the following criteria:

  • The level is the first level in the dimension, or the LevelType property of the object is levAll.

  • The Grouping property of the object is groupingAutomatic.

The AreMemberKeysUnique property is always read-only for objects of ClassType clsDatabaseLevel objects with a SubClassType of sbclsParentChild or sbclsMining.

If the AreMemberKeysUnique property is True, the MemberKeyColumn property of the level uniquely identifies all level members. For example, the following diagram shows the hierarchy of a time dimension. Because the members of Level 3 - Quarters are duplicated under each year level, it is not possible to determine the exact time slice to query without also reading the corresponding value for Level 2 - Years. To uniquely identify the time period 1997 - Q1, the member key columns for Level 2 - Years and Level 3 - Quarters must be combined.

A similar example can be made for a geographic hierarchy. While the names of states or provinces are unique within a single country or region, one or more cities in different countries or regions may share the same name. In this case, the City level does not have unique values.

Esempio

If a level for months of the year with members named Month1, Month2, ... Month12 is added to a dimension below a quarter level, the AreMemberKeysUnique property is set to False. This is because the values in MemberKeyColumn do not uniquely identify each member in the month level within the dimension.

' Assume an object (dsoDim) of ClassType clsDimension exists
Dim dsoLevel As DSO.Level
Set dsoLevel = dsoDim.Levels.AddNew("Months")
dsoLevel.AreMemberKeysUnique = False