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.
SELECT [FLATTENED] [TOP <n>] <expression list> FROM <model>.CASES [WHERE <condition expression>][ORDER BY <expression> [DESC|ASC]]
Optional. An integer that specifies how many rows to return.
- expression list
A comma-separated list of related column identifiers.
A model identifier.
- condition expression
A condition to restrict the values that are returned from the column list.
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
Drillthrough Using IsInNode Example
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')