Decision trees, DMX and CONTAINS (T-SQL)

Answered Decision trees, DMX and CONTAINS (T-SQL)

  • 2006年5月18日 12:30
     
     

    I would appreciate answers to the following doubts I have regarding Decision trees, CONTAINS and using CONTAINS in a DMX query:

    1. Does MS decision tree work only off equality/inequality conditions for the nodes? Is it possible to use a predicate as the branch criteria for a node?

    2. Can the T-SQL predicate CONTAINS(...) be used in a DMX query? I need to check if a column-value is a substring of another column and create an intermediate column that will enable me to construct a decision tree with the phrase-present/absent branch.

    3. Can CONTAINS(...) be used in a select clause? Like -

    SELECT CONTAINS(JAT.column1, '"Good day"')

    FROM JustAnotherTable;

    4. Does CONTAINS(...) support both arguments to be column references? Or, is it mandatory that the pattern (argument #2) has to be a literal string or a variable? E.g.: I need to know the validity of the following expression -

    SELECT * FROM JustAnotherTable JAT

    WHERE CONTAINS(JAT.column1, JAT.column3);

全部回复

  • 2006年5月18日 22:12
    版主
     
     已答复

    The decision tree split conditions are based on equality/inequality conditions for categorical attributes and numeric/range comparisons for continuous values - we don't do arbitrary predicates.

    CONTAINS is not supported in DMX.