• No results found

Return Value

In document Data Mining Extensions (DMX) Reference (Page 152-165)

A value that has the data type of the parameter that has the higher precedence.

Remarks

Both expressions must be of the same data type, or one expression must be able to be implicitly converted to the data type of the other expression. If one expression evaluates to a null value, the operator returns the result of the other expression.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

- (Subtract)

Performs an arithmetic operation that subtracts one number from another number.

Syntax

Numeric_Expression - Numeric_Expression

Parameters

Parameter Description

Numeric_Expression A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Return Value

A value that has the data type of the parameter that has the higher precedence.

Remarks

Both expressions must be of the same data type, or one expression must be able to be implicitly converted to the data type of the other expression. If one expression evaluates to a null value, the operator returns the result of the other expression.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

* (Multiply)

Performs an arithmetic operation that multiples one number by another number.

Syntax

Numeric_Expression * Numeric_Expression

Parameters

Parameter Description

Numeric_Expression A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Return Value

A value that has the data type of the parameter that has the higher precedence.

Remarks

Both expressions must be of the same data type, or one expression must be able to be implicitly converted to the data type of the other expression. If one expression evaluates to a null value, the operator returns a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

/ (Divide)

Performs an arithmetic operation that divides one number by another number.

Syntax

Dividend / Divisor

Parameters

Parameter Description

Dividend A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Divisor A valid DMX expression that

returns a numeric value.

Return Value

A value that has the data type of the parameter that has the higher precedence.

Remarks

The value that this operator returns represents the quotient of the first expression divided by the second expression.

Both expressions must be of the same data type, or one expression must be able to be implicitly converted to the data type of the other expression. If the divisor evaluates to a null value, the operator raises an error. If both the divisor and the dividend evaluate to a null value, the operator returns a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

/ (Divide) (SSIS)

/ (Divide) (Transact-SQL)

< (Less Than)

Performs a comparison operation that determines whether the value of one Data Mining Extensions (DMX) expression is less than the value of another DMX expression.

Syntax

DMX_Expression < DMX_Expression

Parameters

Parameter Description

DMX_Expression A valid DMX expression.

Return Value

A Boolean value that contains TRUE if both parameters are non-null and the first parameter has a value that is less than the value of the second parameter. The Boolean value contains FALSE if both parameters are non-null and the first parameter has a value that is equal to or greater than the value of the second parameter. The Boolean value contains a null value if either parameter or both parameters evaluate to a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

> (Greater Than)

Performs a comparison operation that determines whether the value of one Data Mining Extensions (DMX) expression is greater than the value of another DMX expression.

Syntax

DMX_Expression > DMX_Expression

Parameters

Parameter Description

DMX_Expression A valid DMX expression.

Return Value

A Boolean value that contains TRUE if both parameters are non-null and the first parameter has a value that is greater than the value of the second parameter. The Boolean value contains FALSE if both parameters are non-null and the first parameter has a value that is equal to or less than the value of the second parameter. The Boolean value contains a null value if either parameter or both parameters evaluate to a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

= (Equal To)

Performs a comparison operation that determines whether the value of one Data Mining Extensions (DMX) expression is equal to the value of another DMX expression.

Syntax

DMX_Expression = DMX_Expression

Parameters

Parameter Description

DMX_Expression A valid DMX expression.

Return Value

A Boolean value that contains TRUE if both parameters are non-null and the value of the first parameter is equal to the value of the second parameter. The Boolean value contains FALSE if both parameters are non-null and the value of the first parameter is not equal to the value of the second parameter. The Boolean value contains a null value if either parameter or both parameters evaluate to a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

<> (Not Equal To)

Performs a comparison operation that determines whether the value of one Data Mining Extensions (DMX) expression is not equal to the value of another DMX expression.

Syntax

DMX_Expression <> DMX_Expression

Parameters

Parameter Description

DMX_Expression A valid DMX expression.

Return Value

A Boolean value that contains TRUE if both parameters are non-null and the value of the first parameter is not equal to the value of the second parameter. The Boolean value contains FALSE if both parameters are non-null and the value of the first parameter is equal to the value of the second parameter. The Boolean value contains a null value if either parameter or both parameters evaluate to a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

<= (Less Than or Equal To)

Performs a comparison operation that determines whether the value of one Data Mining Extensions (DMX) expression is less than or equal to the value of another DMX

expression.

Syntax

DMX_Expression <= DMX_Expression

Parameters

Parameter Description

DMX_Expression A valid DMX expression.

Return Value

A Boolean value that contains TRUE if both parameters are non-null and the value of the first parameter is less than or equal to the value of the second parameter. The Boolean value contains FALSE if both parameters are non-null and the value of the first parameter is greater than the value of the second parameter. The Boolean value contains a null value if either parameter or both parameters evaluate to a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

>= (Greater Than or Equal To)

Performs a comparison operation that determines whether the value of one Data Mining Extensions (DMX) expression is greater than or equal to the value of another DMX expression.

Syntax

DMX_Expression >= DMX_Expression

Parameters

Parameter Description

DMX_Expression A valid DMX expression.

Return Value

A Boolean value that contains TRUE if both parameters are non-null and the value of the first parameter is greater than or equal to the value of the second parameter. The

Boolean value contains FALSE if both parameters are non-null and the value of the first parameter is less than the value of the second parameter. The Boolean value contains a null value if either parameter or both parameters evaluate to a null value.

See Also

Operators (DMX)

Data Mining Extensions (DMX) Operator Reference Operators (DMX)

AND

Performs a logical conjunction on two numeric expressions.

Syntax

Expression1 AND Expression2

Parameters

Parameter Description

Expression1 A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Expression2 A valid DMX expression that

returns a numeric value.

Return Value

A Boolean value that returns TRUE if both parameters evaluate to TRUE; otherwise FALSE.

Remarks

Both parameters are treated as Boolean values (0 as FALSE; otherwise TRUE) before the operator performs the logical conjunction. The following table lists the values that are returned based on the various combinations of parameter values.

If Expression1 is If Expression2 is Return value is

TRUE TRUE TRUE

TRUE FALSE FALSE

FALSE TRUE FALSE

FALSE FALSE FALSE

See Also

Operators (DMX)

Logical Operators (DMX) Operators (DMX)

NOT

A logical operator that performs a logical negation on a numeric expression.

Syntax

NOT Expression1

Parameters

Parameter Description

Expression1 A valid DMX expression that

returns a numeric value.

Return Value

A Boolean value that returns FALSE if the argument evaluates to TRUE; otherwise FALSE.

Remarks

The argument is treated as a Boolean value (0 as FALSE; otherwise TRUE) before the operator performs the logical negation. If Expression1 is TRUE, the operator returns FALSE. If Expression1 is FALSE, the operator returns TRUE. The following table illustrates how the logical conjunction is performed.

If Expression1 is Return value is

TRUE FALSE

FALSE TRUE

See Also

Operators (DMX)

Logical Operators (DMX) Operators (DMX)

OR

A logical operator that performs a logical disjunction on two numeric expressions.

Syntax

Expression1 OR Expression2

Parameters

Parameter Description

Expression1 A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Expression2 A valid DMX expression that

returns a numeric value.

Return Value

A Boolean value that returns TRUE if either argument or both arguments evaluate to TRUE; otherwise FALSE.

Remarks

Both arguments are treated as Boolean values (0 as FALSE; otherwise TRUE) before the operator performs the logical disjunction. If either argument or both arguments evaluate to TRUE, the operator returns TRUE. If Expression1 evaluates to TRUE and Expression2 evaluates to FALSE, the operator returns TRUE.

The following table illustrates how the logical disjunction is performed.

If Expression1 is If Expression2 is Return value is

TRUE TRUE TRUE

TRUE FALSE TRUE

FALSE TRUE TRUE

FALSE FALSE FALSE

See Also

Operators (DMX)

Logical Operators (DMX) Operators (DMX)

+ (Positive)

Performs a unary operation that returns the positive value of a numeric expression.

Syntax

+ Numeric_Expression

Parameters

Parameter Description

Numeric_Expression A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Return Value

A value that has the data type of the specified parameter.

See Also

Unary Operators (DMX) Operators (DMX) Unary Operators

- (Negative)

Performs a unary operation that returns the negative value of a numeric expression.

Syntax

- Numeric_Expression

Parameters

Parameter Description

Numeric_Expression A valid Data Mining Extensions

(DMX) expression that returns a numeric value.

Return Value

A value that has the data type of the specified parameter.

See Also

Unary Operators (DMX) Operators (DMX) Unary Operators

// (Comment)

Indicates a text string that Analysis Services should not execute. You can nest comments within a Data Mining Extensions (DMX) statement, include them at the end of a line of code, or insert them on a separate line.

Syntax

// Comment_Text

Parameters

Parameter Description

Comment_Text The string that contains the text of

the comment.

Remarks

Use // for single-line comments only. Comments that are inserted by using // are delimited by the newline character.

There is no maximum length for comments.

For more information about how to use different kinds of comments in DMX, see Comments (DMX).

See Also

Operators (DMX) -- (Comment) (DMX) DMX Operator Reference Operators (DMX)

-- (Comment)

Indicates a text string that Analysis Services should not execute. You can nest comments within a Data Mining Extensions (DMX) statement, include them at the end of a line of code, or insert them on a separate line.

Syntax

-- Comment_Text

Parameters

Parameter Description

Comment_Text The string that contains the text of

the comment.

Remarks

Use this operator for single-line or nested comments. Comments that are inserted by using -- are delimited by the newline character.

There is no maximum length for comments.

For more information about how to use different kinds of comments in DMX, see Comments (DMX).

See Also

Operators (DMX) // (Comment) (DMX) DMX Operator Reference Operators (DMX)

/*...*/ (Comment)

Indicates a text string that Analysis Services should not execute. The server does not evaluate the text between the comment characters /* and */. You can nest comments within a Data Mining Extensions (DMX) statement, include them at the end of a line of code, or insert them on a separate line.

Syntax

/* Comment_Text */

Parameters

Parameter Description

Comment_Text The string that contains the text of

the comment.

Remarks

Multiple-line comments must be indicated by /* and */.

There is no maximum length for comments.

For more information about how to use different kinds of comments in DMX, see Comments (DMX).

See Also

Operators (DMX) -- (Comment) (DMX) DMX Operator Reference Operators (DMX)

Data Mining Extensions (DMX) Syntax

In document Data Mining Extensions (DMX) Reference (Page 152-165)