Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

CONVERT_BASE

CONVERT_BASE

Converts a number from one base value to another base value.

Syntax

CONVERT_BASE(
value, source_base, dest_base
)
Argument
Required/
Optional
Description
value
Required
String datatype. Value you want to convert from one base to another base.
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 )
Data Integration
returns 100010101110.

0 COMMENTS

We’d like to hear from you!