SQL Server STUFF() Function
Delete 3 characters from a string and then insert another sequence of characters, starting in position 1:
Definition and Usage
The STUFF() function deletes a sequence of characters from a string and then inserts another sequence of characters into the string, starting at a specified position.
Tip: See also the REPLACE() function.
|string1||Required. The source string to modify|
|start||Required. The position in string1 to start delete length characters, and then insert add_string|
|length||Required. The number of characters to delete from string1|
|add_string||Required. The sequence of characters to insert into string1 at the start position|
|Works in:||SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005|
Delete 1 character from a string and then insert another sequence of characters, starting in position 13: