Skip Headers

Oracle9i OLAP Developer's Guide to the OLAP DML
Release 2 (9.2)

Part Number A95298-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Selecting Data, 12 of 13


Working with Null Status

You can set the current status list of a dimension to null (empty status) only when you have explicitly specified that you want null status to be permitted. You can give this permission in either of two ways:

If you have not used either of these two methods to give permission for null status and you execute a LIMIT command that would result in null status, then the status is not changed to null when the command is executed. Instead, the status remains the same as it was before the command was issued.

You cannot use the IFNONE and NULL keywords in the same LIMIT command.

Managing Null Status in a Program

An IFNONE argument in a LIMIT command indicates that you do not want program execution to take its normal course when a dimension status is set to null. Therefore, when IFNONE is present, a branch is performed to the IFNONE label and the status is not set to null, even if OKNULLSTATUS is YES. If the NULL keyword is present together with IFNONE, then the inconsistency is signaled with an error.



Tip:

Using the IFNONE argument provides limited flexibility for handling null status because it simply branches to a label. For more flexibility, investigate the possibility of setting the OKNULLSTATUS option to control whether or not execution will branch when status is null, and the possibility of using a WHILE loop to test for null status.


Errors When Limiting Status to a Null Value

An error will not be signaled when you try to limit the status of a dimension or valueset that has no values, unless you explicitly list values that do not exist. For example, if you have not added any values to a newly defined dimension WEEK, then the following command does not cause an error.

LIMIT week TO FIRST 10

However, the following command does cause an error because PETE is not a value.

LIMIT week TO 'PETE'

Similarly, the following command causes an error because WEEK does not have a value at position 20.

LIMIT week TO 20

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 2001, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback