clear markdown compare help best fiddles feedback a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1228811 fiddles created (16682 in the last week).

CREATE TABLE numbers ( id INT ); INSERT INTO numbers VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
10 rows affected
 hidden batch(es)

CREATE FUNCTION dbo.MultiReplace(@ReplaceTarget NVARCHAR(MAX), @from_chars NVARCHAR(MAX), @to_chars NVARCHAR(MAX)) RETURNS NVARCHAR(MAX) AS BEGIN --Quirky Update: One of the rare situations where this is a good idea SELECT @ReplaceTarget=REPLACE(@ReplaceTarget,SUBSTRING(@from_chars, id+1, 1), SUBSTRING(@to_chars, id+1, 1)) FROM numbers WHERE id < LEN(@from_chars) AND id < LEN(@to_chars) ORDER BY id; RETURN @ReplaceTarget; END
 hidden batch(es)

SELECT dbo.MultiReplace(N'abc\defghijklmnopqrstuvw\x\xyz\\', N'xyz', N'abc');
(No column name)
 hidden batch(es)