Use STRSUB
to substitute one string within another string field or constant.
Syntax
@STRSUB (source_string_or_col, search_string, substitute_string, ...)
Examples
For this example, the source string is "123ABC123"
. The value "123"
is to be replaced with "xx"
. The result is xxABCxx
.
result = @STRSUB ("123ABC123", "123", "xx")
For this example, the source string is "123ABC123
". The value "A
" is to be replaced with "z
" and the value "1
" is replaced with "0
". The result is 023zBC023
.
result = @STRSUB ("123ABC123", "A", "z", "1", "0")