OBIEE - Integer Datatype

> Reporting and Data Access Tools > Oracle Business Intelligence (OBIEE/Siebel Analytics)

1 - About

In OBIEE, the integer datatype:

  • follows the rule of an integer division (without the decimal part)
  • is mandatory for some OBIEE intern use such as the LOGLEVEL variable or the indexcol function
Advertising

3 - Oracle

To have an integer from the Oracle database, you must:

  • of create a number(1)
  • of perform a cast as number(1) in your SQL statement

4 - Division

When both operands are INTs, OBIEE perform an integer division.

An integer division give the integer quotient as: <math>26/10=2</math>

To perform floating point division, the datatype must be changed to a floating point type as for instance by using or use the CAST function.

Example:

CAST(ColumnA AS DOUBLE) 
  • In Answers, cast one of the operands is enough.
CAST(ColumnA AS DOUBLE) / ColumnB)

5 - Support

5.1 - After import, I get a double with then a double zero as decimal

OBIEE perform an Integer Division as you can see in the paragraph above (I suppose that the program is then written in C). In short, when you have two integers in your division, the result will lost the decimal part. It's why when you import from Oracle for instance a NUMBER(10), it will set it as a DOUBLE.

To suppress the two zero decimal after the comma, one solution is to set for the column a system- wide default format with a decimal place to zero as below.

Advertising

6 - Documentation / Reference