Inconsistent datatypes errors in BusinessObjects
Trying to refresh a BusinessObjects Web Intelligence report I was getting the following error:
The following database error ocurred: ORA-00932: inconsistent datatypes: expected - got CLOB. For information about this error, please refer to SAP Knowledge Base Article 2054721 on the SAP Support Portal. (IES 10901).
That SAP KB article was a dead end.
I hadn’t heard of CLOB so had to look that up.
Guessing that the problem here is the size of the data being returned, one solution is just to truncate the amount of data. This could be done at the Universe level, but that could affect other reports built on the same Universe, so for this one report I switched the affected query to “Custom SQL” and added a substr() function around the object to pare it down to a reasonable size, and placed that inside a to_char() function to cast the shortened object as a regular char string. Like so…
to_char(dbms_lob.substr(CAPTAINS_LOG_TEXT))Now the report refreshes without any error.