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.
OPERATOR | RESULTS IN |
---|---|
NumericExpr + NumericExpr | Addition |
NumericExpr - NumericExpr | Subtraction |
NumericExpr * NumericExpr | Multiplication |
NumericExpr / NumericExpr | Division |
- NumericExpr | Unary negation |
StringExpr + StringExpr | String concatenation (Microsoft extension) |
ValueExpr < ValueExpr | Less than |
ValueExpr > ValueExpr | Greater than |
ValueExpr <= ValueExpr | Less than or equal to |
ValueExpr >= ValueExpr | Greater than or equal to |
ValueExpr <> ValueExpr | Not equal to |
ValueExpr = ValueExpr | Equal to |
BooleanExpr AND BooleanExpr | True if both expressions are true, false otherwise. |
BooleanExpr OR BooleanExpr | True if either expression is true. |
NOT BooleanExpr | True if expression is not true, false otherwise. |
BooleanExpr XOR BooleanExpr | True if either of the expressions is true but not both of them, and false otherwise. |
MemberExpr IS MemberExpr | True 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.