Skip to content
Advertisement

Oracle SQL CASE WHEN ORA-00932: inconsistent datatypes: expected CHAR got NUMBER 00932. 00000 – “inconsistent datatypes: expected %s got %s”

Getting error

ORA-00932: inconsistent datatypes: expected CHAR got NUMBER 00932. 00000 - "inconsistent datatypes: expected %s got %s"

When i run the following query

If i run it with either a number or text for the else output, like this, it works.

Advertisement

Answer

Use 0 instead of '0'. Amount is a number, and numbers aren’t quoted.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement