Search notes:

ORA-00932: inconsistent datatypes: expected … got …

An ORA-00932 is thrown when a data type cannot be converated to another.
In Oracle versions prior to 23c, the message is ORA-00932: inconsistent datatypes: expected … got …, with the «error message improvement program», the messages changed to ORA-00932: expression is of data type …, which is incompatible with expected data type ….

CHAR / NUMBER

ORA-00932: inconsistent datatypes: expected CHAR got NUMBER

select
   case '1'
      when  2  then 'two'
      when '1' then 'one'
   end
from
   dual;

ORA-00932: inconsistent datatypes: expected NUMBER got CHAR

select
   case  1
      when  2  then 'two'
      when '1' then 'one'
   end
from
   dual;

ORA-00932: inconsistent datatypes: expected CHAR got LONG

The data type of the column data_default in the data dictionary view user_tab_columns is long which essentially makes it impossible to formulate a query-condition on that column when selecting from user_tab_columns:
select *
from
   user_tab_columns
where
   data_default like '%sysdate%';
See also

ORA-00932: inconsistent datatypes: expected - got CLOB

It's not possible to execute a group by on a clob (or blob) value. The following select statement raises a ORA-00932: inconsistent datatypes: expected - got CLOB error:
create table tq84_ora_00932_clob (
    val number,
    txt clob
);
 
select
   txt,
   max(val) max_val
from
   tq84_ora_00932_clob
group by
   txt;
Similarly, it's not possible to use aggregate functions on LOB values, the following statment raises the same error:
select
   count(txt)
from
   tq84_ora_00932_clob;
Cleaning up:
drop table tq84_ora_00932_clob;

ORA-00932: inconsistent datatypes: expected NUMBER got DATE

ceil cannot be applied on a date datatype:
select ceil(sysdate) from dual;

ORA-00932: inconsistent datatypes: expected DATE got DATE

If you get what you want but still complain…
select
   adj_date(sysdate)
from
   dual;

ORA-00932: inconsistent datatypes: expected UDT got NUMBER

The following snippet throws ORA-00932: inconsistent datatypes: expected UDT got NUMBER.
create type tq84_result_line as object (
   num     number(2),
   txt     varchar2(10)
);
/

create type tq84_result_table as table of tq84_result_line;
/


declare
   res tq84_result_table;
begin

   select
      tq84_result_table(level, rpad('x', level, 'x')) --- <== Change to tq84_result_line to fix problem
   bulk collect into res
   from
      dual connect by level <= 10;
      
end;
/

ORA_00932: inconsistent datatypes: expected NLS PARAMETER got NUMBER

select
   to_char(dbms_random.value, '0.0000', 10)
from
   dual;

ORA-00932: inconsistent datatypes: expected TIMESTAMP got TIMESTAMP WITH TIME ZONE

select
   from_tz(systimestamp, 'Europe/Zurich')
from
   dual;

See also

ORA-01722: invalid number
validate_conversion()
datatypes
Other Oracle error messages

Index