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, 2 of 6


Accessing Multidimensional Data Using the OLAP_TABLE Function

One way to access multidimensional data is by using the OLAP_TABLE function. The OLAP_TABLE function is a predefined table function that returns a table of objects that map to analytic workspace data.

Before you can access multidimensional data using the OLAP_TABLE function, you must take the following steps:

  1. Confirm that the analytic workspace has the necessary objects to support the use of the OLAP_TABLE function and define any additional objects as described in "Preparing an Analytic Workspace for Access by OLAP_TABLE".
  2. In SQL, define an object types to represent the analytic workspace structures as a relational table as described in "Creating Object Type Definitions Used by OLAP_TABLE".

Once you have created type definitions and defined the necessary analytic workspace objects, you can make selections of that data using a SELECT statement with the OLAP_TABLE function which works like a regular table function. By using it within a SELECT statement you can select data from the analytic workspace or create a view of analytic workspace data.

The simplified syntax for using the OLAP_TABLE function in a SQL SELECT statement is shown below:

SELECT * FROM TABLE(OLAP_TABLE 
     (aw-attach, table-name, olap-command, limit-map)) 
   AS table-name;

Additionally, by coding the OLAP_TABLE function directly in a SELECT statement of a CREATE VIEW command, you can create a relational view of analytic workspace data without using the CWM2_OLAP_AW_ACCESS PL/SQL package.

For the complete syntax of the OLAP_TABLE function, see "Syntax: OLAP_TABLE Function". For an example of its use, see "Example: Using the OLAP_TABLE Function".


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