Freigeben über


SourceColumn (Measure Interface)

HinweisHinweis

  Diese Funktion wird in der nächsten Version von Microsoft SQL Server entfernt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie so bald wie möglich das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

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

Hinweise

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