Oracle9i OLAP Services Developer's Guide to the OLAP DML Release 1 (9.0.1) Part Number A86720-01 |
|
Working with Expressions, 2 of 14
OLAP DML data types fall into five categories which are referred to as basic data types and are described in the following table.
Basic Type |
Specific Type |
---|---|
Numeric |
INTEGER, SHORTINTEGER, DECIMAL, SHORTDECIMAL |
Text |
TEXT, ID |
Boolean |
BOOLEAN |
Date |
DATE |
Time |
DAY, WEEK, MONTH, QUARTER, YEAR |
Different objects support the use of different data types for their values:
The following numeric data types are supported.
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.
Examples of literal numeric values are:
-1 256000 +2147483647 10000000000.0009
The following types of text data types are supported.
Data Type |
Data Value |
---|---|
TEXT |
Any number of alphanumeric characters enclosed in single quotes ( |
ID |
Up to 8 alphanumeric characters enclosed in single quotes ( |
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:
'First Quarter\'s Earnings' 'sales data eif' 'NONE' '\n' 'JAN96' 'c:\\plan97\\budget.db'
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:
By default, Boolean values as YES
and NO
are displayed. However, you can use the NOSPELL and YESSPELL functions to specify other values for display.
Working with Boolean expressions is discussed in "Boolean Expressions".
A DATE data type is provided that you can use to represent date values. Dates range from January 1, 1000, to December 31, 9999.
To control how values are formatted with the DATE data type in output, use the DATEFORMAT option. For more information on using the DATEFORMAT option, see the entry for the option in the OLAP DML Reference.
To represent DATE values, specify them in either quoted text or integer format.
For quoted text, specify a group of characters enclosed in single quotes ('
). Format the text in one of the styles specified by the DATEORDER option and described in the following table.
See the entry for DATEORDER in the OLAP DML Reference for detailed rules for these styles.
For an integer, specify a number between -328,717 and 2,958,464 (with the integer 1 corresponding to January 1, 1900).
For dimensions, five time data types (DAY, WEEK, MONTH, QUARTER, and YEAR) are supported. You can specify a dimension value for a time dimension in either date or value name (VNF) format:
Note: You can use the MAKEDATE function to create a full date value from a day, month, and year. For more information on the MAKEDATE functions, see the entry for the function in the OLAP DML Reference.
For more information, see the following table.
IF you want documentation about . . . | THEN see . . . |
---|---|
functions that you can use to manipulate text, numbers, dates and time periods, |
the OLAP DML Reference |
specifying file names, |
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|