XLeratorDB/math Documentation
BASE2DECIMAL
Updated: 25 April 2017
Use the scalar function BASE2DECIMAL to convert a text representation of a number in a given base into a decimal number.
Syntax
SELECT [wct].[BASE2DECIMAL] (
<@text, nvarchar(4000),>
,<@Radix, int,>)
Arguments
Input Name | Description |
@text | The text representation of a number in the specified radix (base) |
@Radix | The radix (base) used to generate the text representation |
Return Type
Remarks
Examples
Example #1
In this example we convert the hexadecimal number 'FF'.
SELECT
wct.BASE2DECIMAL('FF',16) as [BASE2DECIMAL]
This produces the following result.
See Also