Logo

EBIN2DEC

Updated 2023-11-08 16:05:09.957000

Syntax

SELECT [westclintech].[wct].[EBIN2DEC] (
   <@Number, nvarchar(4000),>)

Description

Use the scalar function EBIN2DEC to convert an unsigned positive binary number to decimal.

Arguments

@Number

is the positive binary integer you want to convert. @Number is an expression of type nvarchar or of a type that can be implicitly converted to nvarchar.

Return Type

nvarchar(4000)

Examples

select wct.EBIN2DEC(0101010010101110);

This produces the following result.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"21678"}]}