mercredi 13 juillet 2016
Clean phone numbers which has special characters and alphabets
I have junk in the phone number field and i want to clean them. I would like to know how to query to check if there are any special characters , alphabets in the phone number field. Can anyone help please?
I tried this query and didn't work. I need the code in PostgreSQL
select phone from table where phone like '[^[:alpha:]]' and phone <>''
-- and phone not like '[^0-9]'
order by phone
input value in the table looks like:
Phone
-----
(443)-554-6677
111-111-1111
345-rty-34fr
4345434444 ext
Output(should look like this valid phone numbers)
(443)-554-6677
111-111-1111
Your help is appreciated.
Thank You,
Swathi.
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire