I have 1000 records in a customer table where it's missing an area code in the phone number. Is there an easy update statement with substrings to automatically add an area code to all phone numbers that do not currently have an area code?
I tried something like this and it does not work, but this is to give you an idea of what I'm trying to do.
SET home_phone = SUBSTRING(home_phone, 1, 1) + '605-' + SUBSTRING(home_phone, 4, 3) + '-' + SUBSTRING(home_phone, 7, 4)
Your help is greatly appreciated, thanks!