TRANSLATE - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

The TRANSLATE function allows you to translate (replace) a specific character within a data string with another character. This function examines the data string and replaces all occurrences of a specific character with a user specified replacement character.

Category

String

Syntax

TRANSLATE(data_string, original_character, replacement_character)

Parameters and Descriptions
Parameter Description
data_string The source data string in character format. The data string can be a field from a source datastore, a variable, a constant or the result of another Function.
original_character The character that, if found, is to be replaced.
replacement_character This parameter specifies the character that will be used to replace the original character in the source data string.

Example 1

Replace all of the spaces within a source data string with an asterisk (*). Map the result to target field TRANS_OUT.

TRANS_OUT = TRANSLATE ('THIS IS A TRANSLATE TEST', ' ', '*')

Returns the value THIS*IS*A*TRANSLATE*TEST and maps the result to the target field.

Example 2

Replace any occurrence of the hex value 0A with a hex 40 (space) using the X2C function. Map the result to target field TRANS_OUT.

TRANS_OUT = TRANSLATE (source_string, C2X('0A'), C2X('40'))