INSERT
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns a character string where length number
of characters have been deleted from string_exp1 beginning
at start_pos, and string_exp2 has
been inserted into string_exp1, beginning at start_pos.
Syntax
|
Notes
- The string_exp can
be type fixed‑length or variable-length
CHARACTER. - The start_pos and length can be of data type
INTEGER,SMALLINT, orTINYINT. - The result string is of the type string_exp1.
- If any of the argument expressions evaluate to
NULL, the result isNULL. - If start_pos is negative or zero, the result string evaluates to
NULL. - If length is negative, the result evaluates to
NULL. -
string_exp1 and string_exp2 and the result can
contain multi-byte characters. This is determined by the character set of the SQL server.
The
lengthargument specifies a number of characters.
Example
This
example illustrates the INSERT function:
|
The two letters ‘o' and ‘l'
are deleted from the name ‘Goldman' in the last_name column,
and the letters ‘xx' are inserted into the last_name column,
beginning at the fourth character, overlaying the letters ‘d'
and ‘m'.
Compatibility
ODBC compatible