hextobigint  host_id

Chapter 2: Transact-SQL Functions

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; must be a character-type column, 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 biginttohex, convert, inttohex





Copyright © 2005. Sybase Inc. All rights reserved. host_id

View this book as PDF