I need to cast a CHARACTER VARYING column into a NUMERIC type. The source column contains values like : 9.9 ; 99.9 ; NULL. I use the following SQL instruction :
ALTER TABLE test ALTER COLUMN pression TYPE NUMERIC USING to_number(pression, '99.9') ;
I get an error : « invalid input syntax for type numeric: "" » (SQL : 22P02)...
Is there a problem with having both 9.9 and 99.9 kinds of values ?
Thomas