The function INSERT returns a new string build from string1 and
string2. length characters are deleted in string1 at
the position start and it will replaced with the characters of string2.
SQL Syntax:
|
|
INSERT( string1, start, length, string2 ) |
Parameters:
|
|
string1
Any string or binary expression.
start
Any integer expression. This is the start position in string1.
length
Any integer expression. This is the count of deleted characters
in string1.
string2
Any string or binary expression. This is the start position in string1.
|
Escape Syntax:
|
|
{fn INSERT( string1, start, length, string2 ) } |
Return Type:
|
|
A string
or binary
data type depending
the data type of the
string1. |
|
|
|
Alternative Names:
|
|
STUFF This is the equivalent from the MS SQL
Server. |
Examples:
SELECT INSERT( 'abc', 1, 2, '123'), {fn INSERT( 'ABCDE', 3, 1, '123')}
Return Values: 123c, AB123CD
see also:
SQL String Functions
SUBSTRING
|