Skip to content
Advertisement

ORA-00932: inconsistent datatypes: expected CHAR got NUMBER

Logic

The logic is if an order is cancelled then return 0 otherwise return the owed value – the paid value

Small query

Getting the error

ORA-00932: inconsistent datatypes: expected CHAR got NUMBER 00932. 00000 – “inconsistent datatypes: expected %s got %s” *Cause:
*Action: Error at Line: 25 Column: 58

Advertisement

Answer

Try this, either your case should return number or varchar, right now your case return ‘0’ as varchar and else as number. Either both should return a varchar or both should return a number.

When Both return varchar

OR

When Both return number

OR

When Both return number

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