Click to See Complete Forum and Search --> : Formatting Phone Numbers


stretcher25
12-09-2004, 03:22 PM
All my phone numbers in my database are in the format of xxx-xxx-xxxx

Is there an SQL query that can change the format to (xxx)xxx-xxxx ?

russell
12-09-2004, 03:30 PM
whats the db? for ms sql:

SELECT '(' + LEFT(phone, 3) + ') ' + SUBSTRING(phone, 5, 8)