I have table in the database with a phone number column. The numbers look like this:
123456789
I want to format that to look like this:
I found that this works if wanting in a (123) - 456-7890 format.
UPDATE table SET Phone_number = '(' + SUBSTRING(Phone_number, 1, 3) + ') ' + '- ' + SUBSTRING(Phone_number, 4, 3) + '-' + SUBSTRING(Phone_number, 7, 4)