Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

CONVERT_BASE

CONVERT_BASE

Converts a non-negative numeric string from one base value to another base value.

Syntax

CONVERT_BASE(
value, source_base, dest_base
)
The following table describes the arguments for this command:
Argument
Required/
Optional
Description
value
Required
String datatype. Value you want to convert from one base to another base. Maximum is 9,233,372,036,854,775,806.
source_base
Required
Numeric datatype. Current base value of the data you want to convert. Minimum base is 2. Maximum base is 36.
dest_base
Required
Numeric datatype. Base value you want to convert the data to. Minimum base is 2. Maximum base is 36.

Return Value

Numeric value.

Example

The following example converts 2222 from the decimal base value 10 to the binary base value 2:
CONVERT_BASE( "2222", 10, 2 )
The
Data Integration Service
returns 100010101110.

0 COMMENTS

We’d like to hear from you!