PowerCenter
- PowerCenter 10.5
- All Products
REPLACECHR(CaseFlag,InputString,OldCharSet,NewChar)
Argument
| Required/
Optional
| Description
|
---|---|---|
CaseFlag
| Required
| Must be an integer. Determines whether the arguments in this function are case sensitive. You can enter any valid transformation expression.
When
CaseFlag is a number other than 0, the function is case sensitive.
When
CaseFlag is a null value or 0, the function is not case sensitive.
|
InputString
| Required
| Must be a character string. Passes the string you want to search. You can enter any valid transformation expression. If you pass a numeric value, the function converts it to a character string.
If
InputString is NULL, REPLACECHR returns NULL.
|
OldCharSet
| Required
| Must be a character string. The characters you want to replace. You can enter one or more characters. You can enter any valid transformation expression. You can also enter a text literal enclosed within single quotation marks, for example, 'abc'.
If you pass a numeric value, the function converts it to a character string.
If
OldCharSet is NULL or empty, REPLACECHR returns
InputString .
|
NewChar
| Required
| Must be a character string. You can enter one character, an empty string, or NULL. You can enter any valid transformation expression.
If
NewChar is NULL or empty, REPLACECHR removes all occurrences of all characters in
OldCharSet in
InputString .
If
NewChar contains more than one character, REPLACECHR uses the first character to replace
OldCharSet.
|
REPLACECHR( 0, WEBLOG, '"', NULL )
|
|
---|---|
|
|
|
|
|
|
|
|
REPLACECHR ( 1, WEBLOG, ']["', NULL )
|
|
---|---|
|
|
|
|
|
|
|
|
REPLACECHR ( 1, CUSTOMER_CODE, 'A', 'M' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
REPLACECHR ( 0, CUSTOMER_CODE, 'A', 'M' )
|
|
---|---|
|
|
|
|
|
|
|
|
REPLACECHR ( 1, CUSTOMER_CODE, 'A', NULL )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
REPLACECHR ( 1, INPUT, '14', NULL )
|
|
---|---|
|
|
|
|
|
|
|
|
REPLACECHR (1, INPUT, CHR(39), NULL )
|
|
---|---|
|
|
|
|
|
|