SQL error “ORA-01722: invalid number”

前端 未结 13 1737
野趣味
野趣味 2020-11-29 10:15

A very easy one for someone, The following insert is giving me the

ORA-01722: invalid number

why?

INSERT INTO C         


        
13条回答
  •  攒了一身酷
    2020-11-29 10:29

    Here's one way to solve it. Remove non-numeric characters then cast it as a number.

    cast(regexp_replace('0419 853 694', '[^0-9]+', '') as number)
    

提交回复
热议问题