|Oracle® OLAP DML Reference
10g Release 1 (10.1)
Part Number B10339-02
Expressions represent data values in the syntax of the OLAP DML. An expression has a data type and can also have dimensions. You can use expressions as arguments in statements. An expression often performs a mathematical or logical operation. It always evaluates to a result in one of the workspace data types.
An expression can be:
A literal value. For example,
An analytic workspace object that contains multiple values. For example, the variable
A function that returns one or more values. For example, TOTAL or JOINLINES
Another expression that combines literal values, dimensions, variables, formulas, and functions with operators. For example,
You can save an expression as a formula. See "Formulas" for more information.
The data type of an expression is the data type of the resulting value. It might not be the same as the data type of the data objects that make up the expression; it depends on the data and on the operators and functions that are involved.
In addition, a conditional expression that is indicated by an
THEN. . .
ELSE operator is supported. A conditional expression returns a value whose data type depends on the expressions in the
ELSE clauses, not on the expression in the
IF clause, which must be
Note:Do not confuse a conditional expression with the IF...THEN...ELSE statement in a program, which has similar syntax but a different purpose. The
You can use the CONVERT function to change data type of an expression. For example, you can convert a number to text, or you can convert a text string that consists of digits to a number.
However, there is no need to convert data to another type within the same basic category because those conversions are made automatically. In general, you can use
ID data anywhere text is called for, and you can use integers and decimal numbers interchangeably.