다음을 통해 공유


MemberKeyColumn (Level Interface)

[!참고]

  이 기능은 다음 버전의 Microsoft SQL Server에서 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 가능한 한 빨리 수정하십시오.

The MemberKeyColumn property of the Level interface contains the name or expression of the column that contains member keys.

Applies To:clsAggregationLevel, clsCubeLevel, clsDatabaseLevel, clsPartitionLevel

Data Type

String

Access

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

Class type

Access

clsDatabaseLevel

R/W

clsCubeLevel

R/W*

clsPartitionLevel

R/W

clsAggregationLevel

R/W

* Read-only for virtual cube levels.

주의

Some general considerations concerning the MemberKeyColumn property are as follows:

  • In relational terms, a key is a set of one or more columns that uniquely identify an entity. MemberKeyColumn is a key in this sense if the AreMemberKeysUnique property of a level is True. If AreMemberKeysUnique is False, MemberKeyColumn uniquely identifies a member within the context of a parent member only. For example, months are unique only within the context of a given year.

  • The MemberKeyColumn property controls the way the dimensions within a cube are processed. To improve cube-processing efficiency, when you create levels, make sure the lowest level has unique members.

  • Often, the fact table will contain member key values but not necessarily member names. The user, however, sees the member names rather than the keys.

  • MemberKeyColumn can contain any valid SQL expression that involves one or more columns from a single table. For example, either of the following is a valid expression that uses the Product.Prod_Year column:

    """Product"".""Prod_Year"""
    DatePart('q',"Product"."Prod_Year")
    

    [!참고]

    If this property contains an SQL expression, the expression must be compatible with the SQL dialect supported by the OLE DB provider. Using an incompatible expression will result in an error when the cube is processed.

Use the following code to set a level object MemberKeyColumn to the Customer_Number column in table Customer:

LevelObject.MemberKeyColumn = """Customer"".""Customer_Number"""