次の方法で共有


SourceColumn (Measure Interface)

注意

  この機能は、Microsoft SQL Server の次のバージョンで削除されます。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションはできるだけ早く修正してください。

The SourceColumn property of the Measure interface contains a reference to the column in the fact table that contains the measure.

Applies To:clsAggregationMeasure, clsCubeMeasure, clsPartitionMeasure

Data Type

String

Access

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

Class type

Access

clsAggregationMeasure

R

clsCubeMeasure

R/W

clsPartitionMeasure

R/W

説明

To set this property for a measure contained in a regular cube, use the delimiter characters for the data source when naming the table and the column.

For a virtual cube (a cube object with IsVirtual = True), the SourceColumn property is used to reference a measure within an existing cube rather than a column in a source fact table. When you set this property for a measure object within a virtual cube, you do not need to include the delimiter characters associated with the data source for the underlying cube.

The SourceColumn property works in conjunction with the SourceColumnType property.

Examples

Setting the SourceColumn Property

Use the following code to set the SourceColumn property for two measure objects:

' Assume two objects (dsoCubeMea, dsoVirtCubeMea) 
' of ClassType clsCubeMeasure exist.
' The first object is a measure within a regular cube. 
' The measure contains data from the Price column in 
' the Sales_Facts table.
dsoCubeMea.SourceColumn = """Sales_Facts"".""Price"""
...
' The second measure is for a virtual cube that references 
' the Unit_Price measure of a regular cube named Sales
dsoVirtCubeMea.SourceColumn = "[Sales].[Unit_Price]"