Hi all,
Can anyone help me with a little problem I can't solve. I am trying to update a phone_number column to replace any character that is not 0-9 with an empty string ie:
PHONE_TABLE
phone_number
01234-567-890 (result i want = 01234567890)
012345 6789ext (result i want = 0123456789)
n/a (result i want = )
...12345..... (result i want = 12345)
i can identify which records have have non-numeric values in the phone number using...
select *
from PHONE_TABLE
where phone_number like '%[^0-9]%'
but I want to update this table and remove non-numeric characters in the phone_number field something along the lines of....
update PHONE_TABLE
set phone_number = replace(phone_number, [^0-9], '')
Any help would be greatly appreciated
Many thanks,
Paul