Mega Code Archive

 
Categories / MSSQL Tutorial / String Functions
 

Select REPLACE(RIGHT((559) 555-1212, 13), ) , -)

2>  select REPLACE(RIGHT('(559) 555-1212', 13), ') ', '-') 3> GO -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 559-555-1212 (1 rows affected)