| 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.
SQL sql_statement
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 UPDATE clause in the SELECT statement is supported in a cursor declaration so that you can update or delete data associated with the cursor.WHERE CURRENT OF cursor clause is supported in UPDATE and DELETE statements 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 COMMIT or 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 COMMIT command.
|
![]() Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|