ORA-00932 inconsistent datatypes tips
Oracle Error Tips by Burleson Consulting
The Oracle oerr utility notes this about ORA-00932:
ORA-00932: inconsistent datatypes: expected string got string
Cause: One of the following:
- An attempt was made
to perform an operation on incompatible datatypes. For example, adding a
character field to a date field (dates may only be added to numeric fields)
or concatenating a character field with a long field.
- An attempt
was made to perform an operation on a database object (such as a table or
view) that is not intended for normal use. For example, system tables cannot
be modified by a user. Note that on rare occasions this error occurs because
a misspelled object name matched a restricted object's name.
attempt was made to use an undocumented view.
If the cause is different datatypes, then use consistent datatypes. For
example, convert the character field to a numeric field with the TO_NUMBER
function before adding it to the date field. Functions may not be used with
an object not intended for normal use, then do not access
the restricted object.
Possible bug and ORA-00932 error
Oracle technical support offers information regarding ORA-00932 in reference to a bug
which throws the error while trying to use dynamic select statement.
This bug is seen in PL/SQL versions 10.1.0.0-10.2.0.2 on any platform.
The symptoms of this bug consist of ORA-00932
when trying to use a dynamic select statement Though it was functional in
184.108.40.206, it does fail in 10g.
ORA-00932 is caused by the statement you were intending to use with the
Native Dynamic SQL in which the amount of items have to be the same in the
SELECT and INTO lists. Upon experiencing ORA-00932, you may want to
research bug 4381035.
As a workaround to ORA-00932 with the bug, the
SELECT statement should have equal define variables and columns. You
should also note that ORA-00932 will not occur with the specifics of this
bug in 11.x versions.