PredictNodeId (DMX)
适用于: SQL Server Analysis Services
返回事例所属的节点的 Node_ID。
语法
PredictNodeId(<scalar column reference>)
应用于
标量列。
返回类型
<标量表达式>
示例
以下示例返回指定的个人是否可能购买自行车,并且还返回个人最可能属于的节点的 nodeID。
SELECT
[Bike Buyer],
PredictNodeId([Bike Buyer])
From
[TM Decision Tree]
NATURAL PREDICTION JOIN
(SELECT 28 AS [Age],
'2-5 Miles' AS [Commute Distance],
'Graduate Degree' AS [Education],
0 AS [Number Cars Owned],
0 AS [Number Children At Home]) AS t
然后,您可以使用以下语句确定该节点中包含的内容:
SELECT
NODE_CAPTION
FROM
[TM Decision Tree].CONTENT
WHERE NODE_UNIQUE_NAME= '00000000100'