I have a data set where I am trying to clean data. I want to remove the ** from email-address and phone_number and have just numbers in the phone_number column. how can i do it.
Advertisement
Answer
Here is one option using string functions:
update mytable set email = replace(email, '**', ''), phone_number = regexp_replace(phone_number, '\D', '')
This removes '**'
from email
, and all non-digit characters from phone_number
.