SQL INBUILD Function
https://docs.microsoft.com/en-us/sql/t-sql/functions/stuff-transact-sql
SQL Server (starting with 2008)
Azure SQL Database
Azure SQL Data Warehouse
Parallel Data Warehouse
Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data. This expression replaces length characters of character_expression beginning at start. Providing
STUFF (Transact-SQL)
THIS TOPIC APPLIES TO:



The STUFF function inserts a string into another string. It deletes a
specified length of characters in the first string at the start position
and then inserts the second string into the first string at the start
position.
Syntax
STUFF ( character_expression , start , length , replaceWith_expression )
Arguments
character_expression
Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data.
Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data.
start
Is an integer value that specifies the location to start deletion and insertion. If start is negative or zero, a null string is returned. If start is longer than the first character_expression, a null string is returned. start can be of type bigint.
Is an integer value that specifies the location to start deletion and insertion. If start is negative or zero, a null string is returned. If start is longer than the first character_expression, a null string is returned. start can be of type bigint.
length
Is an integer that specifies the number of characters to delete. If length is negative, a null string is returned. If length is longer than the first character_expression, deletion occurs up to the last character in the last character_expression. If length is zero, insertion occurs before the first character in the string. length can be of type bigint.
replaceWith_expressionIs an integer that specifies the number of characters to delete. If length is negative, a null string is returned. If length is longer than the first character_expression, deletion occurs up to the last character in the last character_expression. If length is zero, insertion occurs before the first character in the string. length can be of type bigint.
Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data. This expression replaces length characters of character_expression beginning at start. Providing
NULL
as the replaceWith_expression, removes characters without inserting anything.
Comments
Post a Comment