Database functions

The application have a mechanism in which you can define database formulas from the database's scalar functions.

The procedure is rather simple but effective, giving flexibility to adapt to different databases.

When you connect to the database to define the cube, the kind of database used is obtained. This database type is shown in the initial screen. Basing on this database type, the oxf.oxf is read in OlapX's installation directory. This files have a list of distinct databases, from which we can obtain database functions. This file text is shown below:

Orac|Oracle
Microsoft SQL Server|SqlServer
Informix|Informix
Sybase|Sybase
DB2|DB2
AS-400|AS-400

In each line are stored two fields, the first is the database name as shown in the initial screen of OlapXACC , the second is the name of a .oxf file where this datbase type functions are stored. The formulas are searched in the following files:

<base de datos>.en.oxf : Functions and explanation in english
<base de datos>.es.oxf : Functions and explanation in spanish
<base de datos>.oxf : Default function file, usually with explanation in english.

The file text is used a default file is not database match is found.

This files have a formula and a explanation in each line. Below is a sample from file text.oxf:

LCASE( string_exp )|Uppercase characters in string_exp converted to lowercase.
LEFT( string_exp , count )|The count of characters of string_exp.
LEN( string_exp )|The number of characters in string_exp , excluding trailing blanks and the string termination character.
LTRIM( string_exp )|The characters of string_exp , with leading blanks removed.
MID( string_exp , start , length )|A string derived from string_exp beginning at the character position start for length characters.
RIGHT( string_exp , count )|The rightmost count of characters in string_exp.
RTRIM( string_exp )|The characters of string_exp with trailing blanks removed.
SPACE( count )|A string consisting of count spaces.
UCASE( string_exp )|Lowercase characters in string_exp converted to uppercase.
ABS( numeric_exp )|Absolute value of numeric_exp.
COS( float_exp )|Cosine of float_exp as an angle in radians.

These files can be modified, created or erased according your convenience.

The file mdx.oxf saves formulas for MDX language used to create cube formulas. See Add fields to cube for information about adding database formulas to the database query and Virtual member creation to create cube formulas.