MyRapidi
MyRapidi

Search our Wiki

CONVERT

CONVERT(data, 'from', 'to', ...);

 

Overview

  • Convert can be used to convert a string, part of a string or single character.
  • Using Convert, you can change the outcome of data to be something more appropriate in the destination. In other words, the data of a source field can be converted to be something else in the destination field.

 

Example 1:

##CONVERT("Name", 'ü', 'ue') will convert all occurrences of "ü" in a field to "ue".

 

Example 2: 

##CONVERT("Name", ' ', '_') will convert all occurrences of "' '" in a field to "_".

E.G.

Source value: Rapidi A/S.

Destination value: Rapidi_A/S.

 

Example 3:

##CONVERT("Name", 'A/S', 'GmbH') will convert all occurrences of "A/S" to "GmbH".

 

Example 4:

All records containing the value "Sir" should be converted to "Mr.", therefore we specify:

##CONVERT('Sir ', 'Mr. '); with a blank at the end of "Sir" and a blank at the end of "Mr.".

If the blanks were omitted in this case, all the values beginning with "Sir" would be replaced with "Mr.". Accordingly, if a record contained the value "Siren" this too would be converted to "Mr." even though this was not intended.