create function replace_@ (@EMAIL VARCHAR(50))RETURNS @temp Table(str_eamil varchar(50)) as begin declare @str varchar(50) set @str=replace(@EMAIL,'++','#') insert @temp values(@str) return end go