Create, replace, or copy a stored calculation.
Permissions required: Database Manager to create database-level calculations. Application Manager to create application-level calculations.
Syntax

Use create calculation to create a calculation in the following ways:
| Keyword | Description |
|---|---|
create calculation | Create a calculation script, the body of which is specified by CALC-STRING. |
create or replace calculation | Create a calculation script, the body of which is specified by CALC-STRING. If a calculation script of that name alreay exists, it is replaced. |
create calculation as | Create a calculation as a copy of another stored calculation. |
Notes
When creating database-level calculations, this statement requires the database to be started.
A stored calculation can be associated with an application/database, or with an application only. To create an application-level calculation, use two tokens for CALC-NAME. To create a database-level calculation, use three tokens. See CALC-NAME for more details.
Calculations created using MaxL must be valid. For information about calculation syntax, see the Oracle Essbase Database Administrator's Guide.
Example
create or replace calculation sample.basic.Accts 'SET UPDATECALC ON; CALC DIM(Accounts);' ;
Creates a calculation named Accts that is associated with sample.basic.
create calculation sample.basic.Accts2 as app.db.Accts
Creates a calculation named Accts2 on sample.basic that is a copy of another database's calculation named Accts.