ContentType (clsColumn)

ms135467.note(zh-cn,SQL.90).gif注意:
  下一版本的 Microsoft SQL Server 将删除该功能。请不要在新的开发工作中使用该功能,并尽快修改当前还在使用该功能的应用程序。

The ContentType property of an object of ClassType clsColumn describes the content type of a column's data.

Data Type

String

Access

Read/write for columns with a SubClassType of sbclsRegular whose IsKey and IsParentKey properties are False, read-only for all others.

备注

For columns whose IsKey or IsParentKey properties are set to True and columns with a SubClassType of sbclsNested, this property returns an empty string.

This property suggests the column contents to the mining model. This suggestion is used to optimize the mining model's MiningAlgorithm property and must be specified for each column.

Supported values for this property are listed in the MINING_SERVICESschema rowset in the SUPPORTED_TYPE_FLAGS column.

Examples

The following example demonstrates how to create a new column and set its ContentType property to CONTINUOUS:

'------------------------------------------------------------------------
' Add a new column to the mining model called Unit Sales and relate
' this column to the Sales cube measure of the same name. Set the
' columns data type to Integer, and identify the data content in it as
' being continous and logarithmically normalized. Finally, identify this
' column as being predictable.
' Assume the existence of a DSO Cube object, dsoCb.
'------------------------------------------------------------------------
    'Add another column to the model.
    Set dsoColumn = dsoDmm.Columns.AddNew("Unit Sales")
    'Identify this column as being based on the Unit Sales measure.
    Set dsoColumn.SourceOlapObject = dsoCb.Measures("Unit Sales")
    'Identify the column type.
    dsoColumn.DataType = adInteger
    'Identify this column's content as being continuous.
    dsoColumn.ContentType = "CONTINUOUS"
    'Identify the statistical distribution of this data.
    dsoColumn.Distribution = "LOG_NORMAL"
    'Identify the column as being predictable.
    dsoColumn.IsPredictable = True

请参阅

参考

clsColumn
MiningAlgorithm (clsMiningModel)

其他资源

Data Mining Schema Rowsets

帮助和信息

获取 SQL Server 2005 帮助