Format Phone Number – SQL Server Function
SELECT dbo.CMN_FmtPhone('1234567891011') Output: (123) 456-7891 Ext: 011 SELECT dbo.CMN_FmtPhone('1234567820') Output: (123) 456-7820 CREATE FUNCTION CMN_FmtPhone ( @PhoneNumber varchar(15) ) RETURNS varchar (15) AS BEGIN Declare @returnValue as Varchar(15) SELECT @returnValue…