FromClause (clsColumn)
[!참고]
이 기능은 다음 버전의 Microsoft SQL Server에서 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 가능한 한 빨리 수정하십시오.
The FromClause property of an object of ClassType clsColumn specifies the FROM clause of the SQL query that returns a nested table.
[!참고]
This property applies only to columns that belong to mining model objects of SubClassType sbclsRegular.
Data Type
String
Access
Read/write for columns with a SubClassType of sbclsNested, read-only for all others.
주의
For columns with a SubClassType of sbclsRegular, this property returns the Filter property of the parent object. Columns can be nested, so the parent object can be either a clsMiningModel object or a clsColumn object.
Examples
Creating a New Nested Column
The following code creates a new nested column called Products. It uses the FromClause and JoinClause properties to establish the SQL joins to the parent table. It then creates a new column called CustomerID and establishes that this column contains key values from the parent table by setting the IsParentKey property to TRUE. The clsColumn object that contains the keys in the parent table is referred to by the value of the RelatedColumn property: KeyColumn.
' Create a new nested column.
Set dsoNestedCol = dsoDmm.Columns.AddNew("Products", sbclsNested)
dsoNestedCol.FromClause = """Sales"", ""SalesReps"", ""Products"""
dsoNestedCol.JoinClause = """Sales"".""SalesRep"" = ""SalesReps"".""Name""" & _
" AND ""Sales"".""Product"" = ""Products"".""Product"""
dsoNestedCol.Filter = ""
' Create a new column that contains key values from the parent table.
Set dsoColumn = dsoNestedCol.Columns.AddNew("CustomerID")
dsoColumn.SourceColumn = """Products"".""CustId"""
dsoColumn.DataType = adInteger
dsoColumn.IsParentKey = True
' The RelatedColumn property is set to the clsColumn object used
' as the key column for the data mining model.
dsoColumn.RelatedColumn = "KeyColumn"