JoinClause (Dimension Interface)
The JoinClause property of the Dimension interface contains the SQL JOIN clause for the dimension.
Applies To
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 an earlier version of Microsoft® SQL Server™ 2000 Analysis Services.
Remarks
For objects of ClassType clsDatabaseDimension, if it represents a virtual dimension created in an earlier version of Analysis Services, the JoinClause property returns an empty string.
Example
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