Returns the platform-independent integer equivalent of a hexadecimal string.
hextoint(hexadecimal_string)
is the hexadecimal value to be converted to an integer; must be a character-type column, variable name, or a valid hexadecimal string, with or without a “0x” prefix, enclosed in quotes.
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")
hextoint, a datatype conversion function, returns the platform-independent integer equivalent of a hexadecimal string.
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.
For more information about datatype conversion, see “Datatype conversion functions”.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute hextoint.
Functions biginttohex, convert, inttohex