Skip to main content

REPLACE() Function

Definition The REPLACE() method searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced.   Syntax REPLACE(string, old_string,

Updated over 2 weeks ago

Definition

The REPLACE() method searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced.

Syntax

REPLACE(string, old_string, new_string)

where string is the original sting, old_string is the string to be replaced and new_string is the new replacement string. All 3 parameters are required.

Example(s)

What to use in Custom SQL field:

  • REPLACE([Assignment: Relocation Policy],'Short-Term','ST')

Field Outputs:

mceclip0.png

Remember to use single quote marks around text. 'Short-Term' is replaced by 'ST'.

See how REPLACE() is used to:

Did this answer your question?