Skip to Main Content

SQL & PL/SQL

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!

Same query works in Oracle 18c and 23c, but throws "ORA-65513: value LOB operand mismatch for SQL operator" on Oracle 21c

user-99gkcJul 21 2023 — edited Jul 21 2023

I am encountering a strange bug where the same SQL query runs on 18c/23c but fails on 21c.

I'm wondering if there is any better way to achieve what I am doing than embedding a string directly, as seen here:

coalesce("Albums_rows", to_clob('{ "rows": [] }'))

NOTE: The following SQL is highly unusual and could be better written using correlated subqueries. But I am generating the same SQL template across multiple dialects, some of which don't support correlated subqueries. Oracle is the only one giving issue so far -- and only Oracle 21c!

Links to runnable examples with output:

Thanks in advance for anyone who has suggestions/recommendations.

Also, is there any way to report this to Oracle so that a patch can be made for 21c?

Comments
Post Details
Added on Jul 21 2023
5 comments
741 views