erygrouping

when i made decode statement in select query
and i want tomake agroup by this decode statement
there's an error appear
unvalid number
what i can do?
 
This problem is not a grouping or decode problem, its a conversion problem. When you compare 2 different datatypes, like number and varchar2, and use no conversion functions, then the first column/variable/value sets the type of the expression. As an example:

where numbercol = varchar2col

If numbercol is of type NUMBER, vachar2col will be converted to NUMBER as well. If a value in varchar2col cannot be converted to number (containing letters etc.), you get this error.

Your auto-conversion is in the decode, I guess...

Regards
6502
 
Back
Top