INTTOHEX function [Data type conversion]

Function

Returns the hexadecimal equivalent of a decimal integer.

Syntax

INTTOHEX ( integer-expression )

Parameters

integer-expression The integer to be converted to hexadecimal.

Examples

The following statement returns the value 3B9ACA00:

SELECT INTTOHEX( 1000000000 ) FROM iq_dummy

The following statement returns the value 00000002540BE400:

SELECT INTTOHEX ( 10000000000) FROM iq_dummy

Usage

If data conversion of input to INTTOHEX conversion fails, Sybase IQ returns an error, unless the CONVERSION_ERROR option is OFF. In that case, the result is NULL.

ASE_FUNCTION_BEHAVIOR option The database option ASE_FUNCTION_BEHAVIOR specifies that output of IQ functions, including INTTOHEX and HEXTOINT, be consistent with the output of Adaptive Server Enterprise functions. The default value of ASE_FUNCTION_BEHAVIOR is OFF.

When the ASE_FUNCTION_BEHAVIOR option is disabled (the value is OFF):

When the ASE_FUNCTION_BEHAVIOR option is enabled (the value is ON):

Standards and compatibility

See also

“CONVERSION_ERROR option [TSQL]”

“ASE_FUNCTION_BEHAVIOR option”

“HEXTOINT function [Data type conversion]”