Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
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
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.
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.
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.
Notes
A context exists only for the duration of an Oracle OLAP session. It is not an analytic workspace object and therefore cannot be saved as part of any analytic workspace.
When a context contains saved values for objects in a particular analytic workspace, and you detach that analytic workspace, then Oracle OLAP removes those objects from the context. That context retains any saved values for Oracle OLAP options, as well as objects from other analytic workspaces that are still attached.
Examples
Example 9-17 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