Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)

Part Number A86720-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

Working with Expressions, 10 of 14


Text Expressions

What is a text expression?

A text expression evaluates to data with either the TEXT or ID data type. Text expressions can be any combination of the following:

Example: Text expression

Suppose TEXTVAR is a variable whose value is 'MONTH', which is the name of a dimension. Whether you enclose the word TEXTVAR in quotation marks determines whether the following OBJ function returns the word VARIABLE (the type of object TEXTVAR is) or DIMENSION (the type of object MONTH is).

The following commands produce the output shown below them.

show obj(type 'textvar')
VARIABLE

The following commands produce the output shown below them.

show obj(type textvar)
DIMENSION

Working with dates in text expressions

If you use a DATE value where a text value (TEXT or ID) is expected, or if you store a DATE value in a text variable, then the DATE value is automatically converted to a text value.

The current template in the DATEFORMAT option is used to format the text. If you want to override the current DATEFORMAT template, then you can convert the DATE value to text by using the CONVERT function with a date-format argument. See the entry for the CONVERT function in the OLAP DML Reference for an example.

Once a DATE value is stored in a text variable, the DATEFORMAT template is no longer used to format the display of the value, and subsequent changes to DATEFORMAT have no impact.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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