Export (0) Print
Expand All

SELECT FROM <model>.CASES (DMX)

Supports drillthrough, returning the cases that were used to train the model. If drillthrough is not enabled on the model, the statement will fail. In Data Mining Extensions (DMX) you can only enable drillthrough when you create the model.

For more information about enabling drillthrough, see CREATE MINING MODEL (DMX), SELECT INTO (DMX), and ALTER MINING STRUCTURE (DMX).


SELECT [FLATTENED] [TOP <n>] <expression list> FROM <model>.CASES
[WHERE <condition expression>][ORDER BY <expression> [DESC|ASC]]

n

Optional. An integer that specifies how many rows to return.

expression list

A comma-separated list of related column identifiers.

model

A model identifier.

condition expression

A condition to restrict the values that are returned from the column list.

expression

Optional. An expression that returns a scalar value.

The Lag function can be used with time series models to return or filter on the time lag between each case and the initial time.

Using the IsInNode function in the WHERE clause returns only cases that are associated with the node that is specified by the NODE_UNIQUE_NAME column of the schema rowset.

The following example returns the columns for all the cases that were used to train the Target Mail model. You can use the expression list to return whatever columns you need.

Select * from [TM Decision Tree].Cases

The following example returns just those cases that were used to train the node whose value for the NODE_UNIQUE_NAME column is '0000000010403'.

Select * from [TM Decision Tree].Cases
WHERE IsInNode('0000000010403')
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft