Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-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
Feedback

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

CONTEXT function

The CONTEXT function lets you obtain information about object values that are saved in a context. You must first create the context with the CONTEXT command.

Return Value

The data type of the return value of the CONTEXT function depends on the arguments you provide. When you use the CONTEXT function without supplying any arguments, it returns a multiline text value that contains the names of all the contexts in the current session.

Syntax

CONTEXT ([context-name [UPDATE|name]])

Arguments

context-name

A text expression that contains the name of the context. Using the CONTEXT function with only the context-name returns a multiline text value that contains the names of all the objects saved in that context.

UPDATE

When you specify UPDATE with the CONTEXT function, the return value is the number of times values have been saved or dropped from the context.

name

The name of an object whose value is saved in the context. When you specify name with the CONTEXT function, the return value is the saved status or value of that object.

Examples

Example 9-19 Listing Context Names

In the following statement, the CONTEXT function returns the name of the only context in the current session. This is the same context used in "Saving Dimension Status".

SHOW CONTEXT

The statement produces the following output.

democontext1

Example 9-20 Listing Saved Values

In the following statement, the CONTEXT function returns the values of the product dimension that are saved in the context named democontext1.

SHOW CONTEXT('democontext1' product)

The statement produces the following output.

Tents
Canoes