Contents → Conventions What's New in the OLAP DML? New Features in the OLAP DML OLAP DML Statement Changes for … Oracle11 g OLAP DML Statement Changes for Oracle10 g OLAP DML Statement Changes for Oracle9 i 1 OLAP DML … Basic Concepts What is the OLAP DML? What You Can Do Using
Saving Several Values at Once → You can save the status of one or more dimensions and the values of any number of options and variables in a single PUSH statement, and you can restore the values with a single POP statement, as shown in the following example. PUSH month DECIMALS ZSPELL... POP month DECIMALS ZSPELL
Handling Errors While Saving the Session Environment → To correctly handle errors that might occur while you are saving the session environment, place your PUSHLEVEL statement before the TRAP statement and your PUSH statements after the TRAP statement. PUSHLEVEL 'firstlevel' TRAP ON error PUSH... In the abnormal exit section of your program, place the error label (followed by a colon) and the statements that restore the session environment and handle
Handling Arguments Without Converting Values to a Specific Data Type → Sometimes you want your OLAP DML program to be able to handle arguments without converting values
Using CONTEXT to Save Several Values at Once → As an alternative to using PUSHLEVEL and POPLEVEL, you can use the CONTEXT command. After you create a context, you can save the current status of dimensions and the values of options, single-cell variables, valuesets, and single-cell relations in the context. You can then restore some or all of the object values from the context. The CONTEXT function returns information about objects in a context.
Suppressing Error Messages → When you do not want to produce the error message that is normally provided for a given error, then you can use TRAP statement with a NOPRINT keyword. TRAP ON error NOPRINT When you use the NOPRINT keyword with TRAP, control branches to the error label, and an error message is not issued when an error occurs. The statements following the error label are then executed. When you suppress the error
Handling Errors in Nested Programs → When handling errors in nested programs, the error-handling section in each program should restore the environment. It can also handle any special error conditions that are particular to that program. For example, when your program signals its own error, then you can include statements that test for that error. Any other errors that occur in a nested program should be passed up through the chain of
Specifying Program Contents → The content of a program consists of the following OLAP DML statements: A PROGRAM statement that … .) Additional OLAP DML statements that specify the processing you want performed. You can use almost any of … the OLAP DML statements in a program. There are also some OLAP DML statements, such as flow-of
Creating User-Defined Functions → One type of program that is commonly written is a user-define function that you can use in OLAP DML … statements in much the same way as you use an OLAP DML function. A user-defined function is simply … an OLAP DML program that returns a value. For an example of a user-defined function, see Example 9
Passing Arguments → Use ARGUMENT statements to declare both simple and complex arguments (such as expressions). ARGUMENT statement also make it convenient to pass arguments from one program to another, or to create your own user-defined functions since using these statements you can declare an argument of any data type, dimension, or valueset. Any ARGUMENT statements must precede the first executable line in the program.
Handling Errors → When an error occurs anywhere in a program, Oracle OLAP performs the following actions: Stores the name of the error in the ERRORNAME option, and the text of the error message in the ERRORTEXT option. Note: When the ERRNAMES option is set to the default value of YES, the ERRORTEXT option contains the name of the error (that is, the value of the ERRORNAME option) as well as the text of the error message.
Passing Arguments as Text with Ampersand Substitution → It is very common to pass a simple text argument to a program. However, there are some situations in which you might want to write more general programs or pass a more complicated text argument, such as an argument that is all of the data in one of the analytic workspace objects or the results of an expression. In these cases, you can pass the argument using a substitution expression. Passing an argument
Program Flow-of-Control → Like most programming languages, the OLAP DML has a number of statements that you can use to … in an OLAP DML program because of the intrinsic looping nature of many OLAP DML statements. Table 4-1 … , \"Statements For Determining Flow-of-Control\" lists OLAP DML flow-of-control statements. The … looping characteristic
Saving the Status of a Dimension or the Value of an Option → A PUSH statement saves the current status of a dimension, the value of an option, or the value of a single-cell variable. For example, to save the current value of the DECIMALS option so you can set it to a different value for the duration of the program, use the following statement in the initialization section. PUSH DECIMALS You do not need to know the original value of the option to save it or
Passing an Error to a Calling Program → To pass an error to a calling program, you can use one of two methods. The method you use depends on when you want the error message to be produced. With the first method, Oracle OLAP produces the message immediately and then the error condition is passed through the chain of programs. With the second method, Oracle OLAP passes the error through the chain of programs first and then produces the message.
Creating Your Own Error Messages → stored in the ERRORNAME option, just as an OLAP DML error name is automatically stored. When you … specify your own error message in a SIGNAL statement, then your message is produced just as an OLAP DML
Using Multiple Arguments → A program can declare as many arguments as needed. When the program is executed with arguments specified, the arguments are matched positionally with the declared arguments in the program. When you run the program, you must separate arguments with spaces rather than with commas or other punctuation. Punctuation is treated as part of the arguments. For an example of passing multiple arguments, see
Preserving the Environment Settings → There are two types of environments: Session environment. The dimension status, option values, and output destination that are in effect before a program is run make up the session environment. Program environment. The dimension status, option values, and output destination that you use in a program make up the program environment.
Changing the Program Environment → To perform a task within a program, you often need to change the output destination or some dimension and option values. For example, you might run a monthly sales report that always shows the last six months of sales data. You might want to show the data without decimal places, include the text \"No Sales\" where the sales figure is zero, and send the report to a file. To set up this program environment,
Ways to Save and Restore Environments → The following suggestions let you save the environment of a program or a session: When you want to save the current status or value of a dimension, a valueset, an option, or a single-cell variable that will be changed in the current program, then use PUSHLEVEL and PUSH statements. You can restore the current status values using POPLEVEL and POP statements. When you want to save, access, or update
Statement Description → BREAK Transfers program control from within a SWITCH, FOR, or WHILE statement to the statement immediately following the DOEND associated with SWITCH, FOR, or WHILE. CONTINUE Transfers program control to the end of a FOR or WHILE loop (just before the DO/DOEND statement), allowing the loop to repeat. You can use CONTINUE only within programs and only with FOR or WHILE. DO... DOEND statements Brackets
Using Level Markers → When you are saving the values of several dimensions and options, then PUSHLEVEL and POPLEVEL statements provide a convenient way to save and restore the session environment. You first use a PUSHLEVEL statement to establish a level marker. Once the level marker is established, you use a PUSH statement to save the status of dimensions and the values of options or single-cell variables. When you place
Trapping an Error → To make sure the program works correctly, you should anticipate errors and set up a system for handling them. You can use a TRAP statement to turn on an error-trapping mechanism in a program. When error trapping is on and an error is signaled, then the execution of the program is not halted. Instead, error trapping does the following: Turns off the error-trapping mechanism to prevent endless looping
DML and DDL Transactions → The following are the DML and DDL operations supported in a distributed transaction: CREATE TABLE … DML and DDL statements in parallel, and INSERT direct load statements serially, but note the … cannot perform remote operations after issuing parallel DML/DDL or direct load INSERT. If the … is actually a synonym for a local object.
Data Manipulation Language (DML) Statements → To manipulate database data, you can include DML operations, such as INSERT, UPDATE, and DELETE … COMMIT statement To find out how many rows are affected by DML statements, you can check the value of … manipulation (DML) statement in PL/SQL, there are some situations when the value of a variable is undefined … , then the values
Data Manipulation Language (DML) Statements → Data manipulation language (DML) statements access and manipulate data in existing schema objects … a limited form of DML statement in that it can only access data in the database. It cannot … dynamically. All other DML statements are fully supported in PL/SQL.
DML Statements and Join Views → The general rule is that any UPDATE, DELETE, or INSERT statement on a join view can modify only one underlying base table. The following examples illustrate rules specific to UPDATE, DELETE, and INSERT statements.
Using Synonyms in DML Statements → the jward. employee synonym. A synonym can be referenced in a DML statement the same way that the
Performing DML Operations Inside Pipelined Table Functions → To execute DML statements, declare a pipelined table function with the AUTONOMOUS_TRANSACTION
Inserting Data with DML Error Logging → Inserting Data wit h DML Error Logging When you load a table using an INSERT statement with … the DML error logging feature. To use DML error logging, you add a statement clause that specifies … the name of an error logging table into which the database records errors encountered during DML … continues. You then
Performing DML Operations on Pipelined Table Functions → triggers can be defined for all DML operations on a view built on a table function.
Avoiding Inner Capture in DML Statements → You can avoid inner capture in DML statements by following these rules: Specify an alias for each … table in the DML statement. Keep table aliases unique throughout the DML statement. Avoid table
Stage 1: Client Application Issues DML Statements → At the Sales department, a salesperson uses SQL*Plus to enter a sales order and then commit it. The application issues a number of SQL statements to enter the order into the sales database and update the inventory in the warehouse database: CONNECT email@example.com...; INSERT INTO orders...; UPDATE firstname.lastname@example.org...; INSERT INTO orders...; UPDATE email@example.com...;
Parallel DML → scale up large DML operations against large database tables and indexes. Note: Although DML generally … includes queries, in this chapter the term DML refers only to inserts, updates, merges, and deletes … . This section discusses the following parallel DML topics: Advantages of Parallel DML over Manual
DML Locks → The purpose of a DML lock (data lock) is to guarantee the integrity of data being accessed … concurrently by multiple users. DML locks prevent destructive interference of simultaneous conflicting DML … or DDL operations. DML statements automatically acquire both table-level locks and row-level locks … topics:
Running One DML Statement Multiple Times (FORALL Statement) → The keyword FORALL lets you run multiple DML statements very efficiently. It can only repeat a … single DML statement, unlike a general-purpose FOR loop. For full syntax and restrictions, see FORALL … ; END IF; END LOOP; -- Now it's easy to run one DML statement -- on one subset of elements, -- and … another DML
Parallel DML Tips → This section provides an overview of parallel DML functionality. The topics covered include … : Parallel DML Tip 1: INSERT Parallel DML Tip 2: Direct-Path INSERT Parallel DML Tip 3: Parallelizing INSERT … , MERGE, UPDATE, and DELETE Parallel DML Tip 1: INSERT The functionality available using an INSERT
Affinity and Parallel DML → For parallel DML (inserts, updates, and deletes), affinity enhancements improve cache performance … by routing the DML operation to the node that has affinity for the partition. Affinity determines how … to distribute the work among the set of instances or parallel execution servers to perform the DML … DML when
DML → Data manipulation language. Includes statements like INSERT, UPDATE, and DELETE, which change data in tables.
Reducing Loop Overhead for DML Statements and Queries with Bulk SQL → PL/SQL sends SQL statements such as DML and queries to the SQL engine for execution, and SQL … COLLECT clause brings back batches of results from SQL. If the DML statement affects four or more database … any number of rows, without requiring a FETCH statement for each one. Note: Parallel DML is disabled … the BULK COLLECT clause.
Optimizing DML Operations During Refresh → You can optimize DML performance through the following techniques: Implementing an Efficient MERGE Operation Maintaining Referential Integrity Purging Data
Additional Considerations for Parallel DML → and global index blocks are shared by server processes of the same parallel DML statement. Even if … . The parallel DML DOP is thus effectively limited by the smallest number of transaction free lists … available on the table and on any of the global indexes the DML statement must maintain. For example … Parallel DDL and parallel
DML Behavior → Because this procedure is performed online, DML on the base table are permitted during this … operation, and are processed as normal. All DML statements that occur during RECREATE_INDEX_ONLINE are … duration when DML will fail with an error being raised stating that the index is in an in-progress … status. DML
OLAP DML Aggregation Objects → subtopics: What is an OLAP DML Aggregation? Aggregating Data Using the OLAP DML Compiling
3.1.3 GeoRaster DML Trigger → automatically creates a unique DML trigger for each GeoRaster column whenever a user creates a … SDO_GEOR_UTL.createDMLTrigger procedure to create the DML trigger on each added GeoRaster column. The trigger … is fired after each of the following data manipulation language (DML) operations affecting a
6 OLAP DML Options → Category One topic for each of the OLAP DML options, arranged alphabetically beginning with … ALLOCERRLOGFORMAT. For other OLAP DML reference topics, see Chapter 5, \"OLAP DML Properties\", Chapter 7 … , \"OLAP DML Functions: A - K\", Chapter 8, \"OLAP DML Functions: L - Z\", Chapter 9, \"OLAP DML
OLAP DML Data Types → In the OLAP DML, as in other languages, a data type is a collection of values and the definition of … one or more operations on those values. The Oracle OLAP DML supports the data types outlined in … Table 2-1, \" Summary of OLAP DML Data Types \". Table 2-1 Summary of OLAP DML Data Types Data Type … to the OLAP
Required OLAP DML Objects → Several objects must be predefined within the analytic workspace to support the mapping of dimension hierarchies in the limit map: a parent relation, which identifies the parent of each dimension member within a hierarchy. See \"Parentrel Relation\" for more information. a hierarchy dimension, which lists the hierarchies of a dimension. See \"Hierlist Dimension\" for more information. an inhierarchy
The DML Returning Clause → The INSERT, UPDATE, and DELETE statements can have an optional DML returning clause which returns … column value expressions expr, into host variables hv, with host indicator variables iv. The DML … the DML returning clause; but ANSI Dynamic SQL Method 4 does. See Also: Chapter 14, \" ANSI Dynamic SQL\"
About OLAP DML Commands → OLAP DML commands work in much the same way as commands in other programming languages—the one … exception is the looping nature of OLAP DML commands as discussed in \"OLAP DML Statements Apply to All … of the Values of a Data Object\". Many OLAP DML commands perform complex actions. Some of these … and the DEFINE
DML SQL Statements → DML statements can change data in database tables. For example, DML statements are used to perform … rows from a table Lock a table in the database Explain the execution plan for a SQL statement DML … Data Through Input Bind Variables INSERT INTO departments VALUES(:1,:2,:3) DML statements also enable
DML Returning Clause → This clause is allowed in INSERT, DELETE, and UPDATE statements. See \"The DML Returning Clause\".
Using DML Error Logging → Error logging enables the processing of DML statements to continue despite errors being encountered … error message are stored in an error table. After the DML operation completes, you can check the … error table to correct rows with errors. DML error logging is supported for SQL statements such as … INSERT, UPDATE, MERGE, and
Enabling DML Error Logging → DML error logging is generated for set-based PL/SQL mappings if the following conditions are … object: In the Project Explorer, right-click the data object for which DML error logging should be … . If you do not specify a shadow table name for a data object, DML error logging is not enabled for … operators bound to this data object.
DML Error Logging Limitations → DML error logging has certain limitations. DML error logging is not supported for non-scalar … datatypes. In addition, each DML statement has specific limitations, which are listed in documentation … related to that statement. See Also: Oracle Database SQL Language Reference for limitations on DML … error logging
About OLAP DML Properties → … You can name, create, and assign properties to an object using an OLAP DML PROPERTY command … particular, you can assign system properties that interact with the OLAP DML.
OLAP DML Formulas → You can save an expression in a formula. Frequently, you define a formula for ease of use and to save storage space. Once you have defined a formula for an expression, you can use the name of the formula takes the place of the text of the expression. Oracle OLAP does not store the data for a formula in a variable; instead it is calculated at runtime each time it is requested. Before you create a formula,
OLAP DML Allocation Objects → overview of how to allocate data using OLAP DML statements. It includes the following subtopics … : Introduction to Allocating Data Using the OLAP DML Features of Allocation in Oracle OLAP Allocating Data Handling NA Values When Allocating Data
3.5.1 Viewing Pending DML → When documents in the base table are inserted, updated, or deleted, their ROWIDs are held in a DML … example, to view pending DML on all your indexes, enter the following statement: SELECT