Logo

SQL Server EBIN2DEC Function

Updated 2023-11-08 16:05:09.957000

Description

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

Syntax

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

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.

column 1
21678