다음을 통해 공유


MemberNameColumn (Level Interface)

[!참고]

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

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.

주의

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"

[!참고]

  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 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"""