SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Format Phone Number function

By Harsha Majety,

This function was written according to my needs , please modify to suit your requirements.


Input : VARCHAR(8000)

Output : VARCHAR(8000) [Formatted Phone Number]


Ex :

'8601234567' returns '(860)123-4567'



Tested on : SQL 2000,2005,2008

Total article views: 2126 | Views in the last 30 days: 2