FromClause (boyut arabirimi)
Not
Bu özellik Microsoft SQL Server'ın bir sonraki sürümünde kaldırılacaktır. Yeni geliştirme işlerinde bu özelliği kullanmayın ve bu özelliği kullanmakta olan uygulamaları mümkün olduğunca erken bir zamanda değiştirin.
The FromClause property of the Dimension interface contains the SQL FROM clause for the dimension.
İçin geçerlidir:clsAggregationDimension, clsCubeDimension, clsDatabaseDimension, clsPartitionDimension
Veri Türü
String
Erişim
Erişim bağlıdır değerine bağlı ClassType özellik, nesne.
Sınıf türü |
Erişim |
---|---|
clsDatabaseDimension |
R/W |
clsCubeDimension |
R |
clsPartitionDimension |
R |
clsAggregationDimension |
R/W |
Örnek
Bir veritabanına aşağıdaki tablolar içerir:
Sales_Facts
Customer
Product
Product_Class
Promotion
Store
Calendar
Aşağıdaki şemada, bu tabloları ilişkiler gösterilmiştir.
Aşağıdaki kodu bir boyut oluşturmak, bir veri kaynak atamak için kullanabilir ve küme FromClause özellik:
Dim dsoServer As New DSO.Server
Dim dsoDB As DSO.MDStore
Dim dsoDS As DSO.DataSource
Dim dsoDim As DSO.Dimension
' Connect to local Analysis server.
dsoServer.Connect "LocalHost"
' Open TestDB database.
Set dsoDB = dsoServer.MDStores("TestDB")
' Create a Product dimension for the database.
Set dsoDim = dsoDB.Dimensions.AddNew("Products")
' Create a data source.
Set dsoDS = dsoDB.DataSources.AddNew("FoodMart 2000")
dsoDS.ConnectionString = "Provider=MSDASQL.1;" & _
"Persist Security Info=False;" & _
"Data Source=FoodMart;" & _
"Connect Timeout=15"
' Assign the data source to the dimension.
Set dsoDim.DataSource = dsoDS 'Set the dimension data source.
dsoDim.FromClause = "product" 'Set the source dimension table.
' Update the database.
dsoDB.Update