![]() Previous |
![]() Next |
Using the OLAP DML SQL statement within an OLAP DML program you can copy relational data into analytic workspace objects using either an implicit cursor or an explicit cursor:
To copy data from relational tables into analytic workspace objects using an implicit cursor, use the SQL SELECT statement. You can use this OLAP DML statement interactively in the OLAP Worksheet or within an OLAP DML program.
To copy data from relational tables into analytic workspace objects using an explicit cursor, use the following statements in the order indicated. You can only use these statements within an OLAP DML program. You cannot use them interactively in the OLAP Worksheet.
SQL DECLARE CURSOR defines a SQL cursor by associating it with a SELECT statement or procedure.
SQL OPEN activates a SQL cursor.
SQL FETCH and SQL IMPORT retrieve and process data specified by a cursor.
SQL CLOSE closes a SQL cursor.
SQL CLEANUP cancels a SQL cursor declaration and frees the memory resources of an SQL cursor.
For examples of programs that copy table data into workspace objects, see SQL FETCH and SQL IMPORT.