Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Evaluate in filter in 12c

Hi community,
any idea why this logical command in BI 12c fails?
SELECT 0 s_0, s_1, s_2, s_3
FROM "BI_CUBE"
WHERE ("PERIOD"."PERIOD" > (EVALUATE('TO_DATE(''20170101'',''YYYYMMDD'')'))) AND ("PROJECT"."NAME" = 'XXX')
ERROR:
Error Codes: OPR4ONWY:U9IM8TAC:U9IM8TAC:U9IM8TAC:U9IM8TAC:OI2DL65P
But if I use equal sign than I get results. Also in 11.9g IT WORKS!! What I don't understand is the BOOL type. Result of both sides is DATE...
Answers
-
Looks like a known issue and known behavior is OBIEE 12c have a look at below KM documents:
OBIEE 12C - Reports Migrated From OBIEE 11g Generate the Error - State: HY000. Code: 22024. [nQSError: 22024] A comparison is being carried out between non-compatible types TIMESTAMP and VARCHAR (Doc ID 2127741.1)
OBIEE 12c : Few Reports Migrated From OBIEE 11g throw error: "Comparison is being carried out between non-compatible types DATE and VARCHAR" (Doc ID 2190067.1)
0 -
Hi,
I know your Period is probably a date type in Oracle, but in OBIEE terms, as the field has accuracy that includes time, the data type will be datetime.
i.e. sysdate in Oracle DB is 02-JUN-2017 09:02:35 GMT
So if you cast your Period as date in your formula you may find that fixes your issue.
Hope this helps,
Robert.
0 -
Thanks Robert for help, but your idea doesn't work. I'm getting still the same error. And I don't think this is the problem because if I change the operator to = or to IN:
SELECT 0 s_0, s_1, s_2, s_3
FROM "BI_CUBE"
WHERE ("PERIOD"."PERIOD" = (EVALUATE('TO_DATE(''20170101'',''YYYYMMDD'')'))) AND ("PROJECT"."NAME" = 'XXX')
Then all works like a charm...
0 -
Thanks Syed, I'm not sure if your provided links are related to my issue because under certain circumstances the command works. Or better It only works when I use = or IN
0 -
Have you tried it the other way, casting your literal to a datetime?
0 -
What type of source are you accessing and which version? (Oracle DB 12.2.0.1, Essbase 11.1.2.3.500,...)
What exact data type are the column in the logical layer? In the physical layer? In the actual source?
OBI12 has new hard rules about data types which might pose an issue for you.
0 -
Different question instead of an answer: why do you use EVALUATE to do a TO_DATE ? OBIEE can manage that kind of thing without having to use an EVALUATE and disturb the DB for that kind of job ...
0 -
Hi Gianni,
the whole process is like that. Users have dashboard prompt year. DB partions are set for Period. So the whole thing is about to construct query from BI which will limit data on period column (date) and therefore I use evaluate to get date from year. The original command is the below:
"PERIOD"."PERIOD" BETWEEN EVALUATE('TO_DATE(@{YEAR}{2017} || ''0101'' ,''YYYYMMDD'')') AND EVALUATE('TO_DATE(@{YEAR}{2017} || ''1231'' ,''YYYYMMDD'')')
If I don't go via partitions built on period then generating the report takes ages.
0 -
Uuhh why not fitler the other way around?
YEAR("PERIOD".PERIOD") = @{YEAR}{2017}
0 -
I knew there was something special
So first of all what Christian just posted: why to make it complicated when you can have an easy solution
Second option is to use OBIEE to build your dates, TO_DATE has an equivalent in OBIEE: TO_DATETIME
0