hextoint

Description

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

Syntax

hextoint (hexadecimal_string)

Parameters

hexadecimal_string

is the hexadecimal value to be converted to an integer. This must be either a character type column or variable name or a valid hexadecimal string, with or without a “0x” prefix, enclosed in quotes.

Examples

Example 1

Returns the integer equivalent of the hexadecimal string “0x00000100”. The result is always 256, regardless of the platform on which it is executed:

select hextoint ("0x00000100")

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute hextoint.

See also

Functions convert, inttohex