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

INSERT( string_exp1 , start_pos , length , string_exp2 ) 

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’:

SELECT INSERT(last_name,2,4,’xx’)
     FROM customer 
     WHERE last_name = ’Goldman’; 
 
INSERT LAST_NAME,2,4,XX)
------------------------
Gxxan              
 
1 record selected 

NOTES

COMPATIBILITY

ODBC Compatible


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095