I am using SQL Server 2008 and I found this solution which is only for SQL Server 2012 – what is the equivelant to format a phone number in SQL Server 2008?
FORMAT([PhoneField],'###-###-####')
sql serversql-server-2008t-sql
I am using SQL Server 2008 and I found this solution which is only for SQL Server 2012 – what is the equivelant to format a phone number in SQL Server 2008?
FORMAT([PhoneField],'###-###-####')
Best Answer
there isn't a function that will do it for you. You can cast the phone number as a string then then parse out the parts and add hyphen