December 31st, 2008
OVERLAY (replace substring)
Posted by
admin in
I. ANSI String Scalar Functions
The OVERLAY function changes all characters to lower case. The embedded_string replaces the length in string starting at character position start. If length is not specified, then the embedded_string will replace all characters after start in string.
Format: OVERLAY(string PLACING embedded_string FROM start [FOR length])
Example: OVERLAY('Dare to be creative' PLACING 'great' FROM 12)
Result: ‘Dare to be great’
> PostgreSQL supports OVERLAY.
> Access, DB2, MySQL, and SQL Server do not support OVERLAY. Instead they use REPLACE.
> Oracle does not support OVERLAY. Instead it uses REGEXP_REPLACE.
Comments Off