Returns a string in which a part of the source string has been deleted, and a new string has been inserted in its place. The result will have the same type as the source string: binary, character, or graphic. Specify the source string, the starting point for the insertion of the new string (integer), the number of bytes to be deleted from the source string, and the string to be inserted.
Example:
This example shows how the string 'INSERTING' can be changed into other strings. The CHAR function limites the length of the resulting strings to 10 bytes:
SELECT CHAR(INSERT('INSERTING',4,2,'IS'),10) CHAR(INSERT('INSERTING',4,0,'IS'),10) CHAR(INSERT('INSERTING',4,2,"),10) FROM T1
The example returns 'INSISTING', 'INSISERTIN', and 'INSTING'.