2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

ora-01722: invalid number on select

I have a query with me, earlier it"s worked fine,Now i am getting this invalid number exception.

SELECT NUM, VALUE FROM deposit
WHERE (
  CASE TYPE WHEN "SAV"
  THEN to_number(VALUE)
  ELSE NULL
  END) > 100

Please suggest me 

userimage

check the  datatype of the column "VALUE " may be it is varchar.

If your value column is having data anything other than number also it will through same exception.

Mentioned exception will occur only when you are trying to convert string to a number.

If your value column is having ","  comma in it also you will get same exception.


userimage
This problem occur when  you are trying to convert String to Number.Observe you are using the to_number() function.
Find out is there any data with out the number.

SELECT VALUE FROM CONFIG WHERE REGEXP_LIKE(VALUE, '[A-Za-z]');

then update the with respective value.
Answer is