OVERLAY SQL Function
Syntax
OVERLAY ( char_exp1 PLACING char_exp2 FROM start_position
[ FOR length ] )
The argument length is optional. If length is not specified, the scalar function returns a character string where char_exp2 has been appended to the char_exp1 beginning at start_position.
Description
The scalar function OVERLAY returns a character string where length characters have been deleted from the char_exp1 beginning at start_position and char_exp2 has been inserted into char_exp1 beginning at start_position.
Example
SELECT OVERLAY( name PLACING 'Technologies' FROM 9 FOR 12 )
From customers
WHERE name = 'FairCom Corporation' ;
OVERLAY(NAME,8,9,TECHNOLOGIES)
--------------------
FairCom Technologies
1 record selected
Details
Note: SQL-99 compatible