Returns true if the specified sub-query returns at least one row.
You can use EXISTS and NOT EXISTS to check for conditions in a nested table. This is useful when creating a filter that controls the data used to train or test a data mining model. For more information, see Creating Filters for Mining Models (Analysis Services - Data Mining).
The following example is based on the [Association] mining structure and mining model that you created in the Basic Data Mining Tutorial. The query returns only those cases where the customer purchased at least one patch kit.
SELECT * FROM [Association].CASES WHERE EXISTS ( SELECT * FROM [v Assoc Seq Line Numbers] WHERE [[Model] = 'Patch kit' )
Another way to view the same data that is returned by this query is to open the model in the Association viewer, right-click the itemset Patch kit = Existing, select the Drill Through option, and then select Model Cases Only.