Vertica Quick Tip: Use the Overlay Function to Easily Insert a String Into Another String

Posted May 14, 2018 by Soniya Shah, Information Developer

white cloud in vault type room representing cloud computing
This blog post was authored by Jim Knicely. 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!