Skip Headers

Oracle9i OLAP User's Guide
Release 2 (9.2)

Part Number A95295-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OLAP_TABLE Function, 5 of 6


Syntax: OLAP_TABLE Function

The syntax for the OLAP_TABLE function is shown below.

OLAP_TABLE (
   aw-attach             IN VARCHAR2,
   table-name            IN VARCHAR2,
   olap-command          IN VARCHAR2,
   limit-map             IN VARCHAR2);

The OLAP_TABLE function returns a table of objects.

Parameters

aw-attach

An optional text expression that specifies the name of the analytic workspace that contains the data you want to query and whether the analytic workspace is detached after this function executes. The format of aw-attach is shown below:

[aw-name DURATION QUERY|SESSION]

where:

aw-name is the name of the analytic workspace that you want attached as the active analytic workspace for Oracle OLAP. When there is one or more analytic workspaces attached, you do not have to specify a value for the aw_attach parameter. In this case, Oracle OLAP searches these analytic workspaces for the analytic workspace objects referenced in the olap-command and limit-map parameters. When you do not specify a value for the aw_attach parameter and an analytic workspace is not attached, an error is returned.

The DURATION phrase specifies when the analytic workspace specified by aw-name is detached. When the analytic workspace specified by aw-name is already attached, the DURATION phrase is ignored. You can specify either of the following keywords:

table-name

The name of the table of objects that this function returns.

olap-command

A text expression that specifies one or more OLAP DML commands, including an OLAP DML program. When you specify a value for this parameter, Oracle OLAP executes these OLAP commands before it selects the data using the mapping provided by the limit-map parameter. When using quotation marks in an OLAP command, follow these guidelines:

The main reasons why you specify a value for the olap-command parameter is if you do not want to support the use of WHERE clauses. In this case, you specify a FETCH command (or an OLAP DML program that includes a FETCH command) for the value of the olap-command parameter instead of specifying a value for the limit-map parameter. For the syntax of the OLAP FETCH command, see the topic for that command in Oracle9i OLAP DML Reference help.

limit-map

A text expression that specifies how Oracle OLAP accesses analytic workspace data. The format of the limit-map parameter is shown below:

[MEASURE object-attribute FROM aw-measure] ...
DIMENSION [object-attribute FROM] aw-dim [WITH
   [HIERARCHY [object-attribute FROM] aw-parent-rel 
        [(aw-hierdim aw-hierdim-value  [[, aw-hierdim aw-hierdim-value] ...])] 
      [INHIERARCHY aw-inhier-object]
      [GID object-attribute FROM aw-gid-object] 
      [PARENTGID object-attribute FROM aw-gid-object]
      [LEVELREL object-attribute-list FROM aw-level-rel USING aw-level-dim]] 
   [[ATTRIBUTE object-attribute FROM aw-attribute] ...]
   [LOOP sparse-dimension]...
[PREDMLCMD olap-command]
[POSTDMLCMD olap-command]


MEASURE block -- Each MEASURE block maps the values of one analytic workspace variable (or a function that returns an analytic workspace variable) specified by aw-measure to an object attribute (table column) specified by object-attribute. All of the analytic workspace variables mapped using a single MEASURE block must have exactly the same analytic workspace dimensions.

DIMENSION block -- Each DIMENSION block maps the values of an analytic workspace dimension to one or more object attributes (table columns). When yo are mapping an analytic dimension, you specify that dimension using a single DIMENSION block. When you are mapping one or more analytic workspace variables using a MEASURE block, you also include one DIMENSION block for each dimension of the analytic workspace variables.

The syntax varies depending on whether or not the dimension is a hierarchical dimension.

When mapping a nonhierarchical dimension, use the object-attribute FROM clause to map the dimension values to a single object attribute (table column) specified by object-attribute.

When mapping a hierarchical dimension, use the WITH HIERARCHY clause to map the dimension values to several object attributes (table columns).

The [object-attribute FROM] aw-parent-rel [(aw-hierdim aw-hierdim-value [[, aw-hierdim aw-hierdim-value]...]) subclause maps the values of an hierarchical analytic workspace dimension to columns in the relational object.

object-attribute is the name of the object attribute (relational table column) to which you want the analytic workspace value mapped.

aw-parent-rel is a relation that is dimensioned by aw-dim and all of the aw-hierdim dimensions. The values of aw-parent-rel are the values of the aw-dim dimension. For each unique combination of dimension values, aw-parent-rel has the value of aw-dim that is the parent. When aw-parent-rel represents more than one hierarchy, you use the aw-hierdim parameter to qualify it to a single hierarchy.

aw-hierdim is the name of a dimension whose values are the names of hierarchies and aw-hierdim-value is the name of a particular hierarchy.

aw-inhier-object is the name of an analytic workspace variable or relation whose non-NA values indicate membership in the hierarchy being mapped. aw-inhier-object must have the same dimensions as aw-parent-rel and aw-gid-object (that is, it must be dimensioned by aw-dim and all of the aw-hierdim dimensions).


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback