|Oracle9i OLAP Developer's Guide to the OLAP DML
Release 2 (9.2)
Part Number A95298-01
Working with Relational Tables, 2 of 7
SQL consists of statements that retrieve, delete, insert, change, and manipulate data stored in relational tables. You can embed SQL statements in OLAP DML programs using the OLAP DML
SQL command show below.
When formatting an SQL statement that is an argument to the OLAP DML
SQL command, wherever you would normally use double quotes (
") in a SQL statement, use a single quote (
'). In the OLAP DML, a double quote (
") indicates the beginning of a comment.
You can use almost any SQL statement that is supported by Oracle in the OLAP DML
SQL command. You can use the
INSERT command to copy data from analytic workspace objects into relational tables. You can use
FETCH to copy data from relational tables into analytic workspace objects.
The following Oracle SQL extensions are also supported:
FOR UPDATEclause in the
SELECTstatement is supported in a cursor declaration so that you can update or delete data associated with the cursor.
WHERE CURRENT OF
cursorclause is supported in
DELETEstatements for interactive modifications to a table.
Support is also provided for stored procedures and triggers. Using stored procedures is discussed in "Using Stored Procedures and Triggers".
Ordinarily, you use the
SQL command in an OLAP DML program, but you can also execute some SQL commands interactively in the OLAP Worksheet. When using SQL interactively, you would typically execute a
SELECT command to produce a relational table of data. However, when using SQL within the OLAP DML, you must define a cursor which contains the
SELECT statement as described in "Declaring a Cursor".
Also, if you code
ROLLBACK as arguments to the OLAP DML
SQL command, the commands are ignored. You cannot rollback using the OLAP DML. To commit your changes, issue the OLAP DML