Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page

Go to previous page
Go to next page
View PDF

3.1 Introducing OLAP DML Expressions

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:

You can save an expression as a formula. See "Formulas" for more information.

3.1.1 How the Data Type of an Expression is Determined

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 IF... THEN. . . ELSE operator is supported. A conditional expression returns a value whose data type depends on the expressions in the THEN and ELSE clauses, not on the expression in the IF clause, which must be BOOLEAN.


Do not confuse a conditional expression with the IF...THEN...ELSE statement in a program, which has similar syntax but a different purpose. The IF statement does not have a data type and is not evaluated like an expression.

3.1.2 Changing the Data Type of an Expression

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 TEXT, NTEXT, or ID data anywhere text is called for, and you can use integers and decimal numbers interchangeably.