I have a column named discount of type varchar2. It contains decimal numbers as well as integers. I want to convert it into number type. So I used this query
update table_name set newdiscount=to_number(discount)
I am getting the "Not a valid number" error. Here new discount is of type number.
I checked if there are any commas present, but they aren't. Of course, there are many rows containing decimal points which are showing up in the result of query test to check any non digit values
SELECT discount FROM table_name WHERE REGEXP_LIKE(discount, '[^[:digit:]]');
How to copy the discount values in to the newdiscount column of type number?