MemberNameColumn (Level Interface)

ms132857.note(de-de,SQL.90).gifHinweis:
  Dieses Feature wird in der nächsten Version von Microsoft SQL Server entfernt. Verwenden Sie dieses Feature nicht zum Entwickeln neuer Anwendungen, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird, zum frühstmöglichen Zeitpunkt ein.

The MemberNameColumn property of the Level interface contains the name of the column that contains member names.

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

clsPartitionLevel

R

clsAggregationLevel

R

* Read-only for virtual cube levels, levels with a LevelType property of levAll, and levels with a Grouping of groupingAutomatic.

Hinweise

This property is useful when the member key column may not contain information recognizable to the user.

For example, a table may contain the columns SKU and Product_Name. When you generate queries by SKU number, you may want to display the corresponding product name for the sake of clarity. In this case, the member key column is SKU, but the member name column is Product_Name.

If you do not assign a value to MemberNameColumn, the Analysis server uses the MemberKeyColumn values for the member names.

Be careful when using expressions in MemberNameColumn that are based on columns other than those specified by MemberKeyColumn. Ensure that there is always a one-to-one correspondence in the values produced by the expressions in MemberNameColumn and MemberKeyColumn.

The MemberNameColumn property can contain any valid SQL expression involving one or more columns from the table that contains the member key column. Such an expression can be used to produce a calculated or concatenated string expression. For example, the following is a valid expression for a Product.Prod_Year member key column:

'Quarter ' & Format(DatePart('q',"Product"."Prod_Year"))

The following is another example from an Employees table:

"Employees"."LastName" + ', ' + "Employees"."Firstname"
ms132857.note(de-de,SQL.90).gifHinweis:
  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.

Beispiel

Use the following code to set the MemberNameColumn property of a level object to the Product_Name column in table Sales:

' Assume an object (dsoLev) of ClassType clsLevel exists
dsoLev.MemberNameColumn = """Sales"".""Product_Name"""

Siehe auch

Verweis

Level Interface
MemberKeyColumn (Level Interface)

Hilfe und Informationen

Informationsquellen für SQL Server 2005