I am trying to format the email address in my table by removing everything starting the @. Also I would like to replace the underscore with blank space.
For exampl
This can be helpful if you need to remove all after the last certain character:
Declare @String nvarchar(max) = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\log.ldf' select reverse(substring(reverse (@String), CHARINDEX('\', reverse (@String))+1, len(reverse (@String))));