Cannot SUM(TO_NUMBER(varchar2 field)) :ORA 01722 [ORACLE]
问题 I have myfield as varchar2 type and I try to sum this field by using sum(to_number(myfield)) but the result is ORA-01722 invalid number. before this error occured I used SUM(TO_NUMBER(REGEXP_REPLACE(BIKOU,'[[:alpha:]]', ''))) and it works but last week I put some decimal value in myfield so this code not work anymore. Here is my example of data in myfield 10,12,13.5,NULL 回答1: If you're getting that error from a string like 13.5 then your session's NLS_NUMERIC_CHARACTERS seems to be set to use