JoinClause (Dimension Interface)

ms133827.note(zh-tw,SQL.90).gif附註:
  下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。

The JoinClause property of the Dimension interface contains the SQL JOIN clause for the dimension.

Applies To:clsAggregationDimension, clsCubeDimension, clsDatabaseDimension, clsPartitionDimension

Data Type

String

Access

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

Class type Access

clsDatabaseDimension

R/W*

clsCubeDimension

R

clsPartitionDimension

R

clsAggregationDimension

R/W

* Read-only for objects of ClassType clsDatabaseDimension that represent a virtual dimension created in Microsoft® SQL Server™ 7.0 OLAP Services.

備註

For objects of ClassType clsDatabaseDimension, if it represents a virtual dimension created in SQL Server 7.0 OLAP Services, the JoinClause property returns an empty string.

範例

A database contains the following tables:

  • Sales_Facts
  • Customer
  • Product
  • Product_Class
  • Promotion
  • Store
  • Calendar

The following diagram illustrates the relationships of these tables.

Use the following code to return the JoinClause of the dimension object:

'Assume an object (dsoDim) of ClassType clsDimension exists
'and is associated with the Product dimension.
Dim strJoinClause As String
strJoinClause = dsoDim.JoinClause

'The immediate window displays the following: 
'"product"."SKU"="product_class"."SKU"
Debug.Print "  Join Clause: " & strJoinClause

請參閱

參考

Dimension Interface

說明及資訊

取得 SQL Server 2005 協助