How to: |
REPLACE replaces all instances of a search string in an input string with the given replacement string. The output is always variable length alphanumeric with a length determined by the input parameters.
REPLACE(input_string , search_string , replacement)
where:
Alphanumeric or text (An, AnV, TX)
Is the input string.
Alphanumeric or text (An, AnV, TX)
Is the string to search for within the input string.
Alphanumeric or text (An, AnV, TX)
Is the replacement string to be substituted for the search string. It can be a null string ('').
REPLACE replaces the string 'South' in the Country Name with the string 'S.'
REPLACE(COUNTRY_NAME, 'SOUTH', 'S.');
For South Africa, the result is S. Africa.
REPLACE removes the characters 'DAY' from the string DAY1:
REPLACE(DAY1, 'DAY', '' )
For 'SUNDAY MONDAY TUESDAY', the result is 'SUN MON TUES'.
WebFOCUS | |
Feedback |