| Oracle9i OLAP Developer's Guide to the OLAP DML Release 2 (9.2) Part Number A95298-01 |
|
Defining Data Objects, 3 of 11
Workspace data types fall into categories, which are referred to as basic data types. They are listed in the following table.
|
Basic Type |
Specific Type |
|---|---|
|
Numeric |
|
|
Text |
|
|
Boolean |
|
|
Date |
|
Different objects support the use of different data types for their values:
INTEGER, SHORTINTEGER, DECIMAL, SHORTDECIMAL, NUMBER, TEXT, ID, NTEXT, BOOLEAN, DATETIME, and DATE data types are supported.INTEGER, NUMBER, TEXT, ID, and NTEXT data types are supported.The following numeric data types are supported.
For data entry, a value for any of these data types can begin with a plus (+) or minus (-) sign; it cannot contain commas. Additionally, a decimal value can contain a decimal point. For data display, thousands and decimal markers are controlled by the NLS_NUMERIC_CHARACTERS option.
The workspace NUMBER data type is fully compatible with the database NUMBER data type. It is used for dimensions and surrogates when a text or integer data type is not appropriate. It is typically assigned to variables that are not used for calculations (like forecasts and aggregations), and it is used for variables that must match the rounding behavior of the database or require a high degree of precision. When deciding whether to assign the NUMBER data type to a variable, keep the following facts in mind in order to maximize performance:
NUMBER variables is slower than calculations on other numeric types such as DECIMAL.NUMBER data type, performance is best if the data already has the NUMBER data type in the analytic workspace because a conversion step is not required.Examples of literal numeric values are:
-1 256000 +2147483647 10000000000.0009
The following text data types are supported.
For data entry, text literals must be enclosed in single quotes. Otherwise, the OLAP DML command processor will look for a workspace object by that name.
In some cases, text data includes values that are not printable. Escape sequences are provided to allow such values to be input and displayed. An escape sequence is a series of alphanumeric characters that begins with a backslash.
The following table shows escape sequences that are recognized.
Examples of literal text values are:
'Raoul D\'Allesandro' 'NONE' 'January 2002'
A Boolean data type is provided that you can use to represent logical values. In code, you can use any of the following values (in any combination of uppercase and lowercase characters) to represent Boolean values:
The values that are used in your installation are determined by the language identified by the NLS_LANGUAGE option. You can use the read-only NOSPELL and YESSPELL options to obtain the values.
Working with Boolean expressions is discussed in "Boolean Expressions".
The following date data types are supported.
The format and language of DATETIME values are controlled by the NLS_DATE_FORMAT and NLS_DATE_LANGUAGE options. The DATETIME data type is supported by Oracle standard libraries and operates the same way in the database, and thus is preferable to the DATE data type. The DATEORDER, DATEFORMAT, and MONTHNAMES options, which control the formatting of DATE values, have no effect on DATETIME values. However, DATETIME and DATE values can be used interchangeably in most DML commands
|
![]() Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|