OBIEE 11.1.1.9: ODBC Error Returns When Filter Includes Cast Function and Session Variable (Doc ID 2162444.1)

Last updated on DECEMBER 06, 2016

Applies to:

Business Intelligence Server Enterprise Edition - Version 11.1.1.9.0 to 11.1.1.9.5 [Release 11g]
Information in this document applies to any platform.

Symptoms

On : 11.1.1.9.0 version, Analytics

In RPD, create a session variable and create an initialization block.
Assign the default initialization value and Datasource from BIServer as

SELECT SUBSTR(EXTRACT(YEAR FROM SYSDATE),1,4) FROM DUAL;

In Analysis, create a simple report with Year and Revenue columns;
Edit Revenue column formula and add FILTER expression as below:

FILTER("Base Facts"."Revenue" USING (YEAR("Time"."T00 Calendar Date")=CAST(VALUEOF(NQ_SESSION."session variable")as double)))

Check the results and you see the ODBC error message:

Error generating view. Error getting cursor in GenerateHead
Error Details
Error Codes: OAMP2OPY:OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
Odbc driver returned an error (SQLExecDirectW).
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A
general error has occurred. [nQSError: 43113] Message returned from OBIS.
[nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)

 

Checked the query log and found out that subject area name is added for the sessions variable.

The formula is supposed to be: CAST(VALUEOF("NQ_SESSION"."session variable")as double)

Instead, it turns out: CAST("Sample Sales Lite".VALUEOF("NQ_SESSION"."session variable")as double)

Notice, there is "Sample Sales Lite" added in the formula, which is wrong.

Changes

Migrated from 11.1.1.7 to 11.1.1.9, the ODBC error returns. 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms