I have a table filled with phone numbers entered in every different way possible (5551212, 1115551212, 111-555-1212, 111 555 1212, 111-555-1212 ex 1234, 5551212 x1234) and I would like to pull them from the table using sql 2008 and have the formatting look like this: (111)555-1212 x1234. People of the internet, you're my only hope! How can I make this happen? Where numbers are missing, I would prefer to leave the area blank, ie 5551212 becomes 555-1212, and 1115551212 becomes (111)555-1212, extension numbers only where they are currently included. Is there an easy fix for this at all?
↧