I have table that has phone number in the format of 888.345.ABCD(2223). In my select statment I would like return 888.345.2223. I can do like following:
select replace (phone_number, 'ABCD(2223)', '2223')
from table1
But I could have different phone numbers, like 888.345.EDED(3333) or 888.345.EDED (3333). How do I write the query?
Update: But I could have phone number like 888.123.4567.