We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Use the OVERLAY Function to Easily Insert a String Into Another String — Vertica Forum

Use the OVERLAY Function to Easily Insert a String Into Another String

[Deleted User][Deleted User] Administrator
edited May 2018 in Tips from the Team

Jim Knicely authored this tip.

The OVERLAY function returns a VARCHAR value representing a string having had a substring replaced by another string.

Example:

dbadmin=> SELECT OVERLAY('See ya @ the Deep Dive Meetup tomorrow in St. Louis, MO!' PLACING ' Vertica' FROM 13 FOR 0) AS "Awesome Event on 05/15/2018";
                   Awesome Event on 05/15/2018
------------------------------------------------------------------
See ya @ the Vertica Deep Dive Meetup tomorrow in St. Louis, MO!
(1 row)

Have Fun!

Sign In or Register to comment.