A.2. Basic Operators

This section lists the basic operators for manipulating strings, numbers, and logical conditions.

A.2.1. Value Operators

Table A-1 lists the basic operators. A ValueExpr can be either numeric or string, but it must be the same type on both sides of the operator. An ObjectExpr can refer to any metadata object or to NULL.

Expressions can be grouped with parentheses () to make the ordering of operations clear.

Table A.1. List of Operators
OPERATORRESULTS IN
NumericExpr + NumericExprAddition
NumericExpr - NumericExprSubtraction
NumericExpr * NumericExprMultiplication
NumericExpr / NumericExprDivision
- NumericExprUnary negation
StringExpr + StringExprString concatenation (Microsoft extension)
ValueExpr < ValueExprLess than
ValueExpr > ValueExprGreater than
ValueExpr <= ValueExprLess than or equal to
ValueExpr >= ValueExprGreater than or equal to
ValueExpr <> ValueExprNot equal to
ValueExpr = ValueExprEqual to
BooleanExpr AND BooleanExprTrue if both expressions are true, false otherwise.
BooleanExpr OR BooleanExprTrue if either expression is true.
NOT BooleanExprTrue if expression is not true, false otherwise.
BooleanExpr XOR BooleanExprTrue if either of the expressions is true but not both of them, and false otherwise.
MemberExpr IS MemberExprTrue if the two member expressions evaluate to the same member. This is an extension to OLE DB for OLAP that both Microsoft and Hyperion imple-ment. Note that NULL may be used in AS2000 and AS2005 to test if the other member reference is ...

Get Professional SQL Server™ Analysis Services 2005 with MDX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.