MemberKeyColumn (Level Interface)
Remarque : |
---|
Cette fonctionnalité sera supprimée dans la prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et modifiez dès que possible les applications qui utilisent actuellement cette fonctionnalité. |
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.
Notes
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")
Remarque : 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.
Exemple
Use the following code to set a level object MemberKeyColumn to the Customer_Number column in table Customer:
LevelObject.MemberKeyColumn = """Customer"".""Customer_Number"""
Voir aussi
Référence
AreMemberKeysUnique (Level Interface)
Level Interface
MemberNameColumn (Level Interface)