REPLACE
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Replaces all occurrences of string_exp2 in string_exp1 with string_exp3.
Syntax
|
Notes
-
string_exp can
be fixed‑length or variable‑length
CHARACTERdata types. - If any of the arguments of the expression evaluates to
NULL, the result isNULL. - If the replacement string is not found in the search string, it returns the original string.
- Each occurrence of string_exp and the result can contain multi‑byte characters. Character comparisons are case sensitive and are determined by sort weights in the collation table in the database.
Example
This
example illustrates the REPLACE function, replacing
the letters ‘mi' in the last_name ‘Smith' with
the letters ‘moo':
|
Compatibility
ODBC compatible