+ All Categories
Home > Documents > Oracle OLAP DML Referencevii 4 OLAP DML Properties About OLAP DML Properties.....4-1 System...

Oracle OLAP DML Referencevii 4 OLAP DML Properties About OLAP DML Properties.....4-1 System...

Date post: 17-Oct-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
1634
Oracle® OLAP DML Reference 11g Release 2 (11.2) E17122-05 August 2010
Transcript
  • Oracle® OLAPDML Reference

    11g Release 2 (11.2)

    E17122-05

    August 2010

  • Oracle OLAP DML Reference, 11g Release 2 (11.2)

    E17122-05

    Copyright © 1994, 2010, Oracle and/or its affiliates. All rights reserved.

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

    Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

    This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

  • iii

    Contents

    Preface ............................................................................................................................................................. xxv

    Audience................................................................................................................................................... xxvDocumentation Accessibility ................................................................................................................. xxvRelated Documents ................................................................................................................................. xxviConventions ............................................................................................................................................. xxvi

    What's New in the OLAP DML? ....................................................................................................... xxvii

    New Features in the OLAP DML......................................................................................................... xxviiOLAP DML Statement Changes for Oracle Database 11g................................................................ xxxiiOLAP DML Statement Changes for Oracle Database 10g............................................................... xxxivOLAP DML Statement Changes for Oracle Database 9i ................................................................ xxxvii

    1 OLAP DML Basic Concepts

    What is the OLAP DML? ........................................................................................................................ 1-1Cube-Aware OLAP DML Statements ............................................................................................. 1-1OLAP DML Statements that Work Directly on Analytic Workspace Objects .......................... 1-2

    Basic Syntactic Units of the OLAP DML ............................................................................................. 1-3How to Execute OLAP DML Statements ............................................................................................. 1-4Introduction to Analytic Workspaces ................................................................................................... 1-4

    Privileges Needed to Create and Delete Analytic Workspaces................................................... 1-4Defining a New Analytic Workspace.............................................................................................. 1-5Working with Previously-Defined Analytic Workspaces............................................................ 1-5Viewing Information About an Analytic Workspace ................................................................... 1-6

    Introduction to Analytic Workspace Data Objects ............................................................................ 1-6Types of Analytic Workspace Data Objects ................................................................................... 1-7

    Variables....................................................................................................................................... 1-7Objects that Can Dimension Variables .................................................................................... 1-8Relations ....................................................................................................................................... 1-9Valueset and Surrogate Objects ............................................................................................. 1-10

    Objects that Support the Use of Hierarchies ............................................................................... 1-10Hierlist Dimension................................................................................................................... 1-11Parentrel Relation..................................................................................................................... 1-12Levellist Dimension ................................................................................................................. 1-13Hierlevels Valueset .................................................................................................................. 1-14Inhier Valueset or Variable..................................................................................................... 1-14

  • iv

    Levelrel Relation ...................................................................................................................... 1-16Familyrel Relation.................................................................................................................... 1-17Gidrel Relation ......................................................................................................................... 1-19

    OLAP DML Statements Apply to All of the Values of a Data Object ........................................ 1-20Changing the Default Looping Behavior of Statements............................................................ 1-20

    How to Specify the Set of Data that OLAP DML Operations Work Against ............................ 1-20About Status Lists ........................................................................................................................... 1-21

    Default Status Lists .................................................................................................................. 1-21Current Status Lists ................................................................................................................. 1-21

    Changing the Current Status of a Dimension to Work with a Subset of Data....................... 1-21Saving and Restoring Current Dimension Status....................................................................... 1-22Using a Subset of Data Without Changing Status...................................................................... 1-22

    Populating Multidimensional Hierarchical Data Objects ............................................................ 1-22

    2 Data Types, Operators, and Expressions

    OLAP DML Data Types .......................................................................................................................... 2-1Numeric Data Types.......................................................................................................................... 2-4

    Using LONGINTEGER Values ................................................................................................. 2-4Using NUMBER Values ............................................................................................................. 2-4

    Text Data Types.................................................................................................................................. 2-5Text Literals ................................................................................................................................. 2-5Escape Sequences ........................................................................................................................ 2-5

    Date-only Data Type.......................................................................................................................... 2-6Date-only Input Values .............................................................................................................. 2-6Date-only Dimension Values .................................................................................................... 2-7DATE-only Variable Display Styles ......................................................................................... 2-8

    Datetime and Interval Data Types................................................................................................... 2-8Datetime and Interval Fields ..................................................................................................... 2-9Datetime Format Templates .................................................................................................. 2-10String-to-Date Conversion Rules .......................................................................................... 2-10DATETIME Data Type............................................................................................................ 2-11TIMESTAMP Data Type ........................................................................................................ 2-12TIMESTAMP_TZ Data Type ................................................................................................. 2-12TIMESTAMP_LTZ Data Type ............................................................................................... 2-13YMINTERVAL Data Type ..................................................................................................... 2-13DSINTERVAL Data Type ...................................................................................................... 2-14

    Boolean Data Type .......................................................................................................................... 2-15RAW Data Type .............................................................................................................................. 2-16Row Identifier Data Types............................................................................................................. 2-16

    ROWID Data Type................................................................................................................... 2-16UROWID Data Type................................................................................................................ 2-17

    Converting from One Data Type to Another .............................................................................. 2-17Automatic Conversion of Textual Data Types .................................................................... 2-17Automatic Conversion of Numeric Data Types.................................................................. 2-17

    OLAP DML Operators.......................................................................................................................... 2-18Arithmetic Operators...................................................................................................................... 2-19Comparison and Logical Operators ............................................................................................. 2-19

  • v

    Assignment Operator ..................................................................................................................... 2-20 OLAP DML Expressions ..................................................................................................................... 2-20

    About OLAP DML Expressions.................................................................................................... 2-21How the Data Type of an Expression is Determined ......................................................... 2-21How the Dimensionality of an Expression is Determined ................................................ 2-21

    Determining the Dimensions of an Expression............................................................ 2-22How Dimension Status Affects the Number of Values in the Results of Expressions ...... 2-22

    Using Workspace Objects in Expressions.................................................................................... 2-23How OLAP DML Data Objects Behave in Expressions ..................................................... 2-23Syntax for Specifying an Object in an Expression............................................................... 2-24

    Considerations When Creating and Using Qualified Object Names........................ 2-25Specifying Values of Dimensions and Composites in Expressions.................................. 2-26

    Specifying a Value of a Composite................................................................................. 2-26Specifying a Value of a CONCAT Dimension.............................................................. 2-27Using Related Dimensions in Expressions.................................................................... 2-27

    Using Variables and Relations in Expressions .................................................................... 2-27Limiting a Dimension to a Single Value Without Changing Status ................................. 2-28

    Syntax of a Qualified Data Reference ............................................................................ 2-28Qualifying a Variable ....................................................................................................... 2-29Replacing a Dimension in a Variable............................................................................. 2-30Qualifying a Relation ....................................................................................................... 2-30Qualifying a Dimension................................................................................................... 2-31Using Ampersand Substitution with QDRs ................................................................. 2-31

    Working with Empty Cells in Expressions ................................................................................. 2-31Specifying a Value of NA........................................................................................................ 2-32Controlling how NA values are treated ............................................................................... 2-32

    Numeric Expressions...................................................................................................................... 2-32Mixing Numeric Data Types .................................................................................................. 2-32Using Text Dimensions in Arithmetic Expressions ............................................................ 2-33Limitations of Floating Point Calculations........................................................................... 2-33Controlling Errors During Calculations ............................................................................... 2-33

    Text Expressions.............................................................................................................................. 2-34Language of Text Expressions ............................................................................................... 2-34Working with DATETIME Values in Text Expressions ..................................................... 2-34Working with NTEXT Data.................................................................................................... 2-34

    Datetime and Interval Expressions............................................................................................... 2-35Datetime Expressions ............................................................................................................. 2-35Interval Expressions ............................................................................................................... 2-35Datetime/Interval Arithmetic ............................................................................................... 2-36

    Date-only Expressions .................................................................................................................... 2-37Boolean Expressions ....................................................................................................................... 2-38

    Creating Boolean Expressions................................................................................................ 2-39Comparing NA Values in Boolean Expressions.................................................................. 2-40Controlling Errors When Comparing Numeric Data ......................................................... 2-40

    Controlling Errors Due to Numerical Precision........................................................... 2-40Controlling Errors When Comparing Floating Point Numbers ................................ 2-40

  • vi

    Controlling Errors When Comparing Different Numeric Data Types ..................... 2-41Comparing Dimension Values............................................................................................... 2-41Comparing Dates ..................................................................................................................... 2-42Comparing Text Data .............................................................................................................. 2-42

    Comparing a Text Value to a Text Pattern.................................................................... 2-43Comparing Text Literals to Relations ............................................................................ 2-43

    Conditional Expressions ................................................................................................................ 2-43IF...THEN...ELSE expression .................................................................................................. 2-43SWITCH Expressions .............................................................................................................. 2-44

    Substitution Expressions ................................................................................................................ 2-45

    3 Formulas, Models, Aggregations, and Allocations

    Creating Calculation Objects ................................................................................................................. 3-1OLAP DML Formulas.............................................................................................................................. 3-2OLAP DML Model Objects.................................................................................................................... 3-3

    What is an OLAP DML Model? ....................................................................................................... 3-3Creating Models ................................................................................................................................. 3-3

    Nesting Models ........................................................................................................................... 3-4Dimension Status and Model Equations ................................................................................. 3-4Using Data from Past and Future Time Periods .................................................................... 3-5Handling NA Values in Models ............................................................................................... 3-5Solving Simultaneous Equations .............................................................................................. 3-6Modeling for Multiple Scenarios .............................................................................................. 3-6

    Compiling Models ............................................................................................................................. 3-6Resolving Names in Equations ................................................................................................. 3-7Code for Looping Over Dimensions ........................................................................................ 3-7Evaluating Program Arguments............................................................................................... 3-8Dependencies Between Equations............................................................................................ 3-8Obtaining Analysis Results .................................................................................................... 3-10Checking for Additional Problems........................................................................................ 3-10

    Running a Model............................................................................................................................. 3-10Syntax for Running a Model .................................................................................................. 3-11Dimensions of Solution Variables ......................................................................................... 3-11

    Debugging a Model ........................................................................................................................ 3-12OLAP DML Aggregation Objects ...................................................................................................... 3-13

    What is an OLAP DML Aggregation? ......................................................................................... 3-13Aggregating Data Using the OLAP DML ................................................................................... 3-13Compiling Aggregation Specifications ........................................................................................ 3-14Executing the Aggregation ............................................................................................................ 3-15Creating Custom Aggregates ........................................................................................................ 3-15

    OLAP DML Allocation Objects......................................................................................................... 3-15Introduction to Allocating Data Using the OLAP DML............................................................ 3-16Features of Allocation in Oracle OLAP........................................................................................ 3-16Allocating Data................................................................................................................................ 3-17Handling NA Values When Allocating Data.............................................................................. 3-17

  • vii

    4 OLAP DML Properties

    About OLAP DML Properties................................................................................................................ 4-1System Properties: Alphabetical Listing ............................................................................................. 4-1System Properties by Category ............................................................................................................. 4-2$AGGMAP................................................................................................................................................. 4-3$AGGREGATE_FORCECALC .............................................................................................................. 4-6$AGGREGATE_FORCEORDER ........................................................................................................... 4-7$AGGREGATE_FROM ........................................................................................................................... 4-8$AGGREGATE_FROMVAR................................................................................................................... 4-9$ALLOCMAP ......................................................................................................................................... 4-10$COUNTVAR ......................................................................................................................................... 4-11$DEFAULT_LANGUAGE .................................................................................................................... 4-12$GID_DEPTH......................................................................................................................................... 4-18$GID_LIST.............................................................................................................................................. 4-19$GID_TYPE ............................................................................................................................................ 4-20$LOOP_AGGMAP ................................................................................................................................ 4-21$LOOP_DENSE ..................................................................................................................................... 4-22$LOOP_VAR........................................................................................................................................... 4-23$NATRIGGER........................................................................................................................................ 4-24$STORETRIGGERVAL ........................................................................................................................ 4-27$VARCACHE.......................................................................................................................................... 4-28

    5 OLAP DML Options

    About Options .......................................................................................................................................... 5-1Options: Alphabetical Listing................................................................................................................ 5-1Options by Category ................................................................................................................................ 5-4ALLOCERRLOGFORMAT .................................................................................................................... 5-8ALLOCERRLOGHEADER ..................................................................................................................... 5-9AWWAITTIME ...................................................................................................................................... 5-10BADLINE ................................................................................................................................................ 5-11BMARGIN .............................................................................................................................................. 5-13CALENDARWEEK ............................................................................................................................... 5-14COLWIDTH............................................................................................................................................ 5-16COMMAS ............................................................................................................................................... 5-17COMPILEMESSAGE............................................................................................................................ 5-18COMPILEWARN ................................................................................................................................... 5-19DATEFORMAT ...................................................................................................................................... 5-20DATEORDER ......................................................................................................................................... 5-24DAYABBRLEN ....................................................................................................................................... 5-26DAYNAMES ........................................................................................................................................... 5-28DECIMALCHAR ................................................................................................................................... 5-29DECIMALOVERFLOW ....................................................................................................................... 5-30DECIMALS............................................................................................................................................. 5-31DEFAULTAWSEGSIZE ........................................................................................................................ 5-33DIVIDEBYZERO ................................................................................................................................... 5-34DSECONDS ........................................................................................................................................... 5-35

  • viii

    ECHOPROMPT ..................................................................................................................................... 5-36EIFBYTES................................................................................................................................................ 5-37EIFEXTENSIONPATH.......................................................................................................................... 5-38EIFNAMES ............................................................................................................................................. 5-39EIFSHORTNAMES ............................................................................................................................... 5-40EIFTYPES ................................................................................................................................................ 5-41EIFUPDBYTES ....................................................................................................................................... 5-42EIFVERSION.......................................................................................................................................... 5-43ERRNAMES ........................................................................................................................................... 5-44ERRORNAME........................................................................................................................................ 5-45ERRORTEXT .......................................................................................................................................... 5-46ESCAPEBASE ........................................................................................................................................ 5-47EXPTRACE.............................................................................................................................................. 5-48INF_STOP_ON_ERROR...................................................................................................................... 5-49LCOLWIDTH ......................................................................................................................................... 5-50LIKECASE .............................................................................................................................................. 5-52LIKEESCAPE.......................................................................................................................................... 5-53LIKENL.................................................................................................................................................... 5-56LIMIT.SORTREL ................................................................................................................................... 5-58LIMITSTRICT........................................................................................................................................ 5-59LINENUM............................................................................................................................................... 5-62LINESLEFT ............................................................................................................................................. 5-64LOCK_LANGUAGE_DIMS................................................................................................................ 5-66LSIZE ....................................................................................................................................................... 5-68MAXFETCH............................................................................................................................................ 5-70MODDAMP ........................................................................................................................................... 5-71MODERROR.......................................................................................................................................... 5-74MODGAMMA....................................................................................................................................... 5-76MODINPUTORDER ............................................................................................................................ 5-79MODMAXITERS .................................................................................................................................. 5-81MODOVERFLOW ................................................................................................................................ 5-82MODSIMULTYPE................................................................................................................................. 5-84MODTOLERANCE............................................................................................................................... 5-87MODTRACE .......................................................................................................................................... 5-90MONTHABBRLEN............................................................................................................................... 5-93MONTHNAMES ................................................................................................................................... 5-95MULTIPATHHIER ................................................................................................................................ 5-97NASKIP ................................................................................................................................................. 5-100NASKIP2 ............................................................................................................................................... 5-103NASPELL .............................................................................................................................................. 5-107NLS_CALENDAR ............................................................................................................................... 5-109NLS_CURRENCY................................................................................................................................ 5-110NLS_DATE_FORMAT........................................................................................................................ 5-111NLS_DATE_LANGUAGE ................................................................................................................. 5-112NLS_DUAL_CURRENCY.................................................................................................................. 5-113NLS_ISO_CURRENCY ...................................................................................................................... 5-114NLS_LANG .......................................................................................................................................... 5-115

  • ix

    NLS_LANGUAGE .............................................................................................................................. 5-116NLS_NUMERIC_CHARACTERS.................................................................................................... 5-117NLS_SORT............................................................................................................................................ 5-118NLS_TERRITORY ............................................................................................................................... 5-119NOSPELL .............................................................................................................................................. 5-120OKFORLIMIT...................................................................................................................................... 5-121OKNULLSTATUS ............................................................................................................................... 5-122OUTFILEUNIT .................................................................................................................................... 5-123PAGENUM ........................................................................................................................................... 5-124PAGEPRG ............................................................................................................................................. 5-126PAGESIZE............................................................................................................................................. 5-129PAGING ................................................................................................................................................ 5-131PARENS................................................................................................................................................. 5-133PERMITERROR .................................................................................................................................. 5-135PERMITREADERROR....................................................................................................................... 5-137POUTFILEUNIT .................................................................................................................................. 5-138PRGTRACE .......................................................................................................................................... 5-140RANDOM.SEED.1 and RANDOM.SEED.2................................................................................... 5-142RECURSIVE ......................................................................................................................................... 5-145ROLE...................................................................................................................................................... 5-146ROOTOFNEGATIVE ......................................................................................................................... 5-147SECONDS............................................................................................................................................. 5-148SESSCACHE ........................................................................................................................................ 5-149SESSION_NLS_LANGUAGE .......................................................................................................... 5-151SORTCOMPOSITE............................................................................................................................. 5-153SPARSEINDEX .................................................................................................................................... 5-155SQLBLOCKMAX ................................................................................................................................ 5-156SQLCODE............................................................................................................................................. 5-157SQLERRM ............................................................................................................................................ 5-158SQLMESSAGES .................................................................................................................................. 5-159STATIC_SESSION_LANGUAGE .................................................................................................... 5-160THIS_AW .............................................................................................................................................. 5-162THOUSANDSCHAR.......................................................................................................................... 5-163TMARGIN ............................................................................................................................................ 5-164TRACEFILEUNIT................................................................................................................................ 5-165TRIGGERMAXDEPTH ...................................................................................................................... 5-166TRIGGERSTOREOK.......................................................................................................................... 5-168USERID ................................................................................................................................................. 5-170USETRIGGERS ................................................................................................................................... 5-171VARCACHE.......................................................................................................................................... 5-172WEEKDAYSNEWYEAR ..................................................................................................................... 5-173WRAPERRORS.................................................................................................................................... 5-174YESSPELL ............................................................................................................................................. 5-175YRABSTART ........................................................................................................................................ 5-176ZEROROW ........................................................................................................................................... 5-177ZSPELL .................................................................................................................................................. 5-179

  • x

    6 OLAP DML Programs

    Programs Provided With the OLAP DML ........................................................................................... 6-1Creating OLAP DML Programs............................................................................................................. 6-2Specifying Program Contents ................................................................................................................ 6-3

    Creating User-Defined Functions .................................................................................................... 6-3Passing Arguments ............................................................................................................................ 6-4

    Using Multiple Arguments........................................................................................................ 6-4Handling Arguments Without Converting Values to a Specific Data Type ...................... 6-4Passing Arguments as Text with Ampersand Substitution.................................................. 6-4

    Program Flow-of-Control ................................................................................................................. 6-5Preserving the Environment Settings.............................................................................................. 6-6

    Changing the Program Environment....................................................................................... 6-6Ways to Save and Restore Environments................................................................................ 6-7Saving the Status of a Dimension or the Value of an Option ............................................... 6-7Saving Several Values at Once .................................................................................................. 6-7Using Level Markers .................................................................................................................. 6-8Using CONTEXT to Save Several Values at Once ................................................................. 6-8

    Handling Errors.................................................................................................................................. 6-8Trapping an Error ....................................................................................................................... 6-8Passing an Error to a Calling Program .................................................................................... 6-9

    Passing an Error: Method One........................................................................................... 6-9Passing an Error: Method Two .......................................................................................... 6-9

    Suppressing Error Messages .................................................................................................. 6-10Creating Your Own Error Messages ..................................................................................... 6-10Handling Errors in Nested Programs ................................................................................... 6-10Handling Errors While Saving the Session Environment.................................................. 6-11

    Compiling Programs............................................................................................................................. 6-11Finding Out If a Program Has Been Compiled .......................................................................... 6-11Programming Methods That Prevent Compilation ................................................................... 6-12

    Testing and Debugging Programs...................................................................................................... 6-12Generating Diagnostic Messages .................................................................................................. 6-12Identifying Bad Lines of Code....................................................................................................... 6-12Sending Output to a Debugging File ........................................................................................... 6-12

    Executing Programs............................................................................................................................... 6-13Common Types of OLAP DML Programs ....................................................................................... 6-13

    Startup Programs ............................................................................................................................ 6-14Permission Programs............................................................................................................... 6-14OnAttach Programs................................................................................................................. 6-15Autogo Programs..................................................................................................................... 6-16

    Data Import and Export Programs............................................................................................... 6-16Importing Data to and Exporting Data from Relational Tables........................................ 6-16

    Importing Data From Relational Tables to Workspace Objects................................. 6-17Exporting Data from OLAP DML Objects to Relational Tables ................................ 6-17

    Importing Data to and Exporting Data from Flat Files ...................................................... 6-17Importing Data to and Exporting Data from Spreadsheets............................................... 6-17

    Trigger Programs ............................................................................................................................ 6-17Creating an Object Trigger Program..................................................................................... 6-18

  • xi

    Characteristics of Object Trigger Programs ......................................................................... 6-19Aggregation, Allocation, and Modeling Programs.................................................................... 6-21Forecasting Programs ..................................................................................................................... 6-21Programs to Export and Import Workspace Objects ................................................................. 6-22

    User-Written Programs Looked For by Oracle OLAP .................................................................... 6-23AUTOGO.......................................................................................................................................... 6-24ONATTACH.................................................................................................................................... 6-25ONDETACH.................................................................................................................................... 6-27PERMIT_READ ............................................................................................................................... 6-28PERMIT_WRITE.............................................................................................................................. 6-29TRIGGER_AFTER_UPDATE ........................................................................................................ 6-30TRIGGER_AW................................................................................................................................. 6-31TRIGGER_BEFORE_UPDATE...................................................................................................... 6-33TRIGGER_DEFINE ......................................................................................................................... 6-35

    7 OLAP DML Functions: A - K

    About OLAP DML Functions ................................................................................................................ 7-1Functions: Alphabetical Listing ............................................................................................................ 7-1Functions by Category............................................................................................................................. 7-7ABS........................................................................................................................................................... 7-15ADD_MONTHS .................................................................................................................................... 7-16AGGCOUNT.......................................................................................................................................... 7-17AGGMAPINFO ..................................................................................................................................... 7-21AGGREGATE function ........................................................................................................................ 7-25AGGREGATION ................................................................................................................................... 7-33AGGROPS .............................................................................................................................................. 7-35ALLOCOPS ............................................................................................................................................ 7-36ANTILOG ............................................................................................................................................... 7-37ANTILOG10 ........................................................................................................................................... 7-38ANY.......................................................................................................................................................... 7-39ARCCOS ................................................................................................................................................. 7-41ARCSIN................................................................................................................................................... 7-42ARCTAN ................................................................................................................................................. 7-43ARCTAN2 ............................................................................................................................................... 7-44ARG.......................................................................................................................................................... 7-45ARGCOUNT .......................................................................................................................................... 7-47ARGFR .................................................................................................................................................... 7-48ARGS ....................................................................................................................................................... 7-50ASCII ....................................................................................................................................................... 7-52ASCIISTR ............................................................................................................................................... 7-53AVERAGE ............................................................................................................................................... 7-54AW function............................................................................................................................................ 7-56BACK ....................................................................................................................................................... 7-59BASEDIM ............................................................................................................................................... 7-60BASEVAL ................................................................................................................................................ 7-62BEGINDATE .......................................................................................................................................... 7-64BIN_TO_NUM ....................................................................................................................................... 7-65

  • xii

    BITAND................................................................................................................................................... 7-66BLANKSTRIP ........................................................................................................................................ 7-67CALLTYPE .............................................................................................................................................. 7-68CATEGORIZE ........................................................................................................................................ 7-69CEIL.......................................................................................................................................................... 7-71CHANGEBYTES.................................................................................................................................... 7-72CHANGECHARS.................................................................................................................................. 7-73CHANGEDRELATIONS ..................................................................................................................... 7-74CHANGEDVALUES ............................................................................................................................. 7-75CHARLIST.............................................................................................................................................. 7-76CHARTOROWID.................................................................................................................................. 7-77CHGDIMS .............................................................................................................................................. 7-78CHR.......................................................................................................................................................... 7-80COALESCE ............................................................................................................................................. 7-81COLVAL .................................................................................................................................................. 7-82CONTEXT function .............................................................................................................................. 7-83CONVERT .............................................................................................................................................. 7-84CORRELATION .................................................................................................................................... 7-92COS .......................................................................................................................................................... 7-95COSH ....................................................................................................................................................... 7-96COUNT.................................................................................................................................................... 7-97CUMSUM ............................................................................................................................................... 7-99CURRENT_DATE ............................................................................................................................... 7-102CURRENT_TIMESTAMP.................................................................................................................. 7-103DAYOF................................................................................................................................................... 7-104DBTIMEZONE .................................................................................................................................... 7-105DDOF..................................................................................................................................................... 7-106DECODE ............................................................................................................................................... 7-107DEPRDECL........................................................................................................................................... 7-110DEPRDECLSW .................................................................................................................................... 7-114DEPRSL ................................................................................................................................................. 7-119DEPRSOYD .......................................................................................................................................... 7-122ENDDATE............................................................................................................................................. 7-126ENDOF .................................................................................................................................................. 7-127EVERY.................................................................................................................................................... 7-128EXISTS................................................................................................................................................... 7-130EXP ......................................................................................................................................................... 7-131EVERSION ........................................................................................................................................... 7-132EXTBYTES ............................................................................................................................................ 7-133EXTCHARS .......................................................................................................................................... 7-134EXTCOLS .............................................................................................................................................. 7-135EXTLINES ............................................................................................................................................. 7-137EXTRACT.............................................................................................................................................. 7-138FCOPEN ................................................................................................................................................ 7-140FCQUERY.............................................................................................................................................. 7-141FILEERROR.......................................................................................................................................... 7-146FILEGET................................................................................................................................................ 7-149

  • xiii

    FILENEXT ............................................................................................................................................. 7-151FILEOPEN............................................................................................................................................. 7-153FILEQUERY .......................................................................................................................................... 7-155FILTERLINES....................................................................................................................................... 7-158FINDBYTES.......................................................................................................................................... 7-160FINDCHARS........................................................................................................................................ 7-162FINDLINES .......................................................................................................................................... 7-164FINTSCHED......................................................................................................................................... 7-165FLOOR................................................................................................................................................... 7-168FPMTSCHED ....................................................................................................................................... 7-169FROM_TZ ............................................................................................................................................. 7-172GET ........................................................................................................................................................ 7-173GREATEST ........................................................................................................................................... 7-177GROUPINGID function .................................................................................................................... 7-178GROWRATE......................................................................................................................................... 7-179HEXTORAW ......................................................................................................................................... 7-181HIERCHECK ........................................................................................................................................ 7-182HIERHEIGHT function ..................................................................................................................... 7-185HIERSHAPE ......................................................................................................................................... 7-189INFO ...................................................................................................................................................... 7-191

    INFO (FORECAST) ....................................................................................................................... 7-192INFO (MODEL) ............................................................................................................................. 7-195INFO (PARSE) ............................................................................................................................... 7-202INFO (REGRESS) .......................................................................................................................... 7-204

    INITCAP ............................................................................................................................................... 7-206INLIST ................................................................................................................................................... 7-207INSBYTES............................................................................................................................................. 7-208INSCHARS ........................................................................................................................................... 7-209INSCOLS .............................................................................................................................................. 7-210INSLINES ............................................................................................................................................. 7-212INSTAT .................................................................................................................................................. 7-213INSTR functions.................................................................................................................................. 7-216INTPART............................................................................................................................................... 7-218IRR.......................................................................................................................................................... 7-219ISDATE.................................................................................................................................................. 7-221ISEMPTY ............................................................................................................................................... 7-222ISINFINITE .......................................................................................................................................... 7-223ISNAN ................................................................................................................................................... 7-224ISSESSION ........................................................................................................................................... 7-225ISVALUE ............................................................................................................................................... 7-226JOINBYTES .......................................................................................................................................... 7-227JOINCHARS ........................................................................................................................................ 7-228JOINCOLS ............................................................................................................................................ 7-230JOINLINES ........................................................................................................................................... 7-232KEY......................................................................................................................................................... 7-233

  • xiv

    8 OLAP DML Functions: L - Z

    LAG ............................................................................................................................................................. 8-2LAGABSPCT............................................................................................................................................. 8-5LAGDIF ...................................................................................................................................................... 8-8LAGPCT .................................................................................................................................................. 8-10LARGEST................................................................................................................................................ 8-12LAST_DAY.............................................................................................................................................. 8-14LEAD........................................................................................................................................................ 8-15LEAST...................................................................................................................................................... 8-18LENGTH functions ............................................................................................................................... 8-19LIMIT function ...................................................................................................................................... 8-20LIMITMAPINFO................................................................................................................................... 8-24LNNVL .................................................................................................................................................... 8-25LOCALTIMESTAMP ............................................................................................................................ 8-26LOG function ......................................................................................................................................... 8-27LOG10...................................................................................................................................................... 8-28LOWCASE .............................................................................................................................................. 8-29LOWER.................................................................................................................................................... 8-30LPAD ........................................................................................................................................................ 8-31LTRIM...................................................................................................................................................... 8-32MAKEDATE ........................................................................................................................................... 8-33MAX ......................................................................................................................................................... 8-35MAXBYTES ............................................................................................................................................ 8-36MAXCHARS .......................................................................................................................................... 8-37MEDIAN ................................................................................................................................................. 8-38MIN .......................................................................................................................................................... 8-40MMOF ..................................................................................................................................................... 8-41MODE...................................................................................................................................................... 8-42MODULO ............................................................................................................................................... 8-44MONTHS_BETWEEN.......................................................................................................................... 8-45MOVINGAVERAGE ............................................................................................................................ 8-46MOVINGMAX ...................................................................................................................................... 8-49MOVINGMIN ....................................................................................................................................... 8-51MOVINGTOTAL .................................................................................................................................. 8-53NA2 .......................................................................................................................................................... 8-55NAFILL.................................................................................................................................................... 8-56NAFLAG ................................................................................................................................................. 8-57NEW_TIME ............................................................................................................................................ 8-58NEXT_DAY ............................................................................................................................................. 8-60NLS_CHARSET_ID .............................................................................................................................. 8-61NLS_CHARSET_NAME ...................................................................................................................... 8-62NLSSORT................................................................................................................................................ 8-63NONE ...................................................................................................................................................... 8-64NORMAL................................................................................................................................................ 8-66NPV .......................................................................................................................................................... 8-67NULLIF.................................................................................................................................................... 8-69NUMBYTES............................................................................................................................................ 8-70

  • xv

    NUMCHARS.......................................................................................................................................... 8-71NUMLINES ............................................................................................................................................ 8-72NUMTODSINTERVAL ........................................................................................................................ 8-73NUMTOYMINTERVAL ....................................................................................................................... 8-74NVL .......................................................................................................................................................... 8-75NVL2 ........................................................................................................................................................ 8-76OBJ ........................................................................................................................................................... 8-77OBJLIST .................................................................................................................................................. 8-91OBJORG.................................................................................................................................................. 8-93OBSCURE ............................................................................................................................................... 8-99ORA_HASH ......................................................................................................................................... 8-101PARTITION .......................................................................................................................................... 8-102PARTITIONCHECK ........................................................................................................................... 8-104PERCENTAGE ..................................................................................................................................... 8-105QUAL ..................................................................................................................................................... 8-107RANDOM ............................................................................................................................................. 8-110RANK .................................................................................................................................................... 8-111RAWTOHEX ......................................................................................................................................... 8-116RECNO .................................................................................................................................................. 8-117REGEXP_COUNT ............................................................................................................................... 8-118REGEXP_INSTR.................................................................................................................................. 8-120REGEXP_REPLACE ............................................................................................................................ 8-122REGEXP_SUBSTR .............................................................................................................................. 8-124REM........................................................................................................................................................ 8-126REMAINDER ....................................................................................................................................... 8-127REMBYTES........................................................................................................................................... 8-128REMCHARS ......................................................................................................................................... 8-129REMCOLS ............................................................................................................................................ 8-130REMLINES ........................................................................................................................................... 8-132REPLACE .............................................................................................................................................. 8-133REPLBYTES.......................................................................................................................................... 8-134REPLCHARS ........................................................................................................................................ 8-136REPLCOLS............................................................................................................................................ 8-138REPLLINES .......................................................................................................................................... 8-140RESERVED ........................................................................................................................................... 8-141ROUND ................................................................................................................................................. 8-143

    ROUND (datetime) ....................................................................................................................... 8-144ROUND (number)......................................................................................................................... 8-147

    ROW function ...................................................................................................................................... 8-150ROWIDTOCHAR................................................................................................................................ 8-152ROWIDTONCHAR ............................................................................................................................ 8-153RPAD ..................................................................................................................................................... 8-154RTRIM ................................................................................................................................................... 8-155RUNTOTAL.......................................................................................................................................... 8-156SESSIONTIMEZONE ........................................................................................................................ 8-158SIGN ...................................................................................................................................................... 8-159SIN.......................................................................................................................................................... 8-160

  • xvi

    SINH ...................................................................................................................................................... 8-161SMALLEST ........................................................................................................................................... 8-162SMOOTH.............................................................................................................................................. 8-164SORT function ..................................................................................................................................... 8-167SORTLINES.......................................................................................................................................... 8-168SOUNDEX ............................................................................................................................................ 8-169SQLFETCH ........................................................................................................................................... 8-170SQRT...................................................................................................................................................... 8-171STARTOF ...........................................


Recommended