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!

ORA-00932: inconsistent datatypes: expected - got BLOB

509382May 10 2006 — edited May 23 2006
Hi,

I am trying to execute from my C/C++ application (based on OCCI) two queries in UNION returning a BLOB field.

The tables are:
- CREATE TABLE T1 (int i1, blob b)
- CREATE TABLE T2 (int c1, blob c)

My query is (SELECT i1, b, length(b) FROM T1) UNION (SELECT c1, c, length(c) FROM T2)

But, executing this query from my C/C++ applicaton interfacing Oracle 9 via OCCI I got the error: ORA-00932: inconsistent datatypes: expected - got BLOB

If I execute only one of the two queries (without the UNION clause):
- SELECT i1, b, length(b) FROM T1
- SELECT c1, c, length(c) FROM T2

Any ideas why, the UNION of select with blob report that error.

Thanks in advance for the help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2006
Added on May 10 2006
5 comments
1,417 views