Skip Headers
Oracle® OLAP DML Reference
11g Release 1 (11.1)

Part Number B28126-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

EVAL_NUMBER Function

The EVAL_NUMBER function evaluates a numeric expression in an analytic workspace and returns the resulting number.

You can specify the EVAL_NUMBER function in a SELECT from DUAL statement to return a numeric constant defined in an analytic workspace. Refer to Oracle Database SQL Language Reference for information on selecting from the DUAL table.

Note:

You cannot execute this function from within the OLAP Worksheet. You must execute if in a SQL tool such as SQL*Plus.

Syntax

EVAL_NUMBER ( 
          olap_numeric_expression     IN    VARCHAR2)
     RETURN NUMBER;

Parameters

Table B-20 EVAL_NUMBER Function Parameters

Parameter Description

olap_numeric_expression

An OLAP DML expression that evaluates to a number. Refer to Chapter 2, "OLAP DML Expressions".


Example

The following example returns the value of the DECIMALS option in the current analytic workspace. The DECIMALS option controls the number of decimal places that are shown in numeric output. In this example, the value of DECIMALS is 2, which is the default.

SQL>set serveroutput on
SQL>select dbms_aw.eval_number('decimals') from dual; 

     DBMS_AW.EVAL_NUMBER('DECIMALS')
     -------------------------------
                                   2
     1 row selected.