Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00932 expected - got NCLOB on Select query

I am getting SQLSyntaxErrorException "ORA-00932: inconsistent datatypes: expected - got NCLOB" on executing a SELECT query on a table that has a NCLOB column. This is run via EclipseLink JPA.
I don't have a NCLOB column in the WHERE condition. I don't have JOIN, DISTINCT, SORT, GROUP etc. in the query. I read from the forums that these are the common causes. I would like to know how else this can occur. I only see the SQL error in the logs, I don't know what values in the query could have caused it, and would like to get some values that I can substitute in the query and simulate the error.
The query is like:
SELECT ID, MSG_STR, ID2, IS_CLEARABLE, MSG_XML, OBJECT_ID, OBJECT_TYPE, ID3, VALIDATION_TYPE, VALIDATION_TYPE_ENTRY, VERSION
FROM MESSAGES
WHERE (((((((ID3 = ?) AND (ID2 = ?)) AND (OBJECT_ID = ?)) AND (OBJECT_TYPE = ?)) AND (VALIDATION_TYPE = ?)) AND (VALIDATION_TYPE_ENTRY = ?)) AND (MSG_STR = ?))
MSG_XML is the NCLOB column.

Comments
Post Details
Added on Aug 3 2022
5 comments
754 views