hextoint

Returns the platform-independent integer equivalent of a hexadecimal string.

Syntax

hextoint(hexadecimal_string)

Parameters

Examples

Usage

Use the hextoint function for platform-independent conversions of hexadecimal data to integers. hextoint accepts a valid hexadecimal string, with or without a “0x” prefix, enclosed in quotes, or the name of a character-type column or variable.

hextoint returns the integer equivalent of the hexadecimal string. The function always returns the same integer equivalent for a given hexadecimal string, regardless of the platform on which it is executed.

See the Transact-SQL Guide for more information about datatype conversion.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute hextoint.

Related reference
biginttohex
convert
inttohex