. Advertisement .
..3..
. Advertisement .
..4..
Here is the program I run:
UPDATE IMS_TEST
SET TEST_Category = 'just testing'
WHERE TEST_SCRIPT = 'something'
AND ID = '10000239'
SQL> create table ims_test(
2 test_category varchar2(30),
3 test_script clob,
4 id varchar2(30)
5 );
Table created.
SQL> insert into ims_test values ('test1','something','10000239');
1 row created.
SQL> UPDATE IMS_TEST
2 SET TEST_Category = 'just testing'
3 WHERE TEST_SCRIPT = 'something'
4 AND ID = '10000239';
WHERE TEST_SCRIPT = 'something'
*
ERROR at line 3:
ORA-00932: inconsistent datatypes: expected - got CLOB
After I run, it returns an error:
*** Start Block ***
ORA-00932: inconsistent datatypes: expected - got CLOB
Does anyone have any suggestions for the problem below: ora 00932 inconsistent datatypes expected got clob in the programs – How to correct it?
The cause:
You have got the ”ora 00932 inconsistent datatypes expected got clob” error due to you are not allowed to place a CLOB in the WHERE clause. The reason is that big objects (for example, LOBs) are not encouraged in the conditions of comparison, so the error occurs.
Solution:
For comparisons on CLOB data, PL/SQL programs are great solution for you.
In the case your values are not enough 4k, let’s use:
If you do as my above suggestions, you will solve your error successfully. Wish you all the best!
This error also occurs when you
SELECT DISTINCT ..., <CLOB_column>, ...
.You can use
to_char(<CLOB_column>)
to combine multiple calls toDBMS_LOB.SUBSTR(<CLOB_column>, ...)
if this CLOB column contains shorter values than the limit for VARCHAR2 in all applicable rows.