Table Email:
Email
Values:
josh@yahoo.com carmine32@hotmail.com zehmaneh@yahoo.com
I want to replace the string before
declare @t table(email varchar(30)) insert @t values('josh@yahoo.com'), ('carmine32@hotmail.com'), ('zehmaneh@yahoo.com') select stuff(email, 1, charindex('@', email), 'Test@') from @t
Result:
Test@yahoo.com Test@hotmail.com Test@yahoo.com