SQL Server: Find first occurrence of dot(.) and replace with underscore(_)

SELECT 'abc.pqr@xyz.com' AS INPUTSTRING,
STUFF('abc.pqr@xyz.com',CHARINDEX('.','abc.pqr@xyz.com'),1,'_') AS OUTPUTSTRING

OUTPUT


No comments:

Post a Comment