Progress
SQL-92
Guide and Reference
INSERT Function
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
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’:
NOTES
- The
string_exp
can be type fixed-length or-variable length CHARACTER.- The
start_pos
andlength
can be of data type INTEGER, SMALLINT, or TINYINT.- The result string is of the type
string_exp1
.- If any of the argument expressions evaluate to null, the result is null.
- If
start_pos
is negative or zero, the result string evaluates to null.- If
length
is negative, the result evaluates to null.string_exp1
andstring_exp2
and the result may contain multi-byte characters. This is determined by the character set of the SQL server. Thelength
argument specifies a number of characters.COMPATIBILITY
ODBC Compatible
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |