select email, SUBSTRING(email, CHARINDEX('@',email)+1,30) from details where len(email) > 0
--Replace all email domain name with new domain name
--ex:-@abc.com replace by @def.com
UPDATE details
SET Email=REPLACE(Email,SUBSTRING(email, CHARINDEX('@',email)+1,30),'def.com') where len(email) > 0
No comments:
Post a Comment