Reputation: 59
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.
Upvotes: 0
Views: 167
Reputation: 222462
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
.
Upvotes: 1