Returns the hexadecimal equivalent of a decimal integer.
INTTOHEX ( integer-expression )
integer-expression The integer to be converted to hexadecimal.
The following statement returns the value 0x000000000000009c:
SELECT INTTOHEX( 156 ) FROM iq_dummy
The following statement returns the value 0x0000000000000064:
SELECT INTTOHEX ( 100) FROM iq_dummy
The ‘0x’
or ‘0X’
prefix
and leading zeroes are included in the result.
The INTTOHEX function in Sybase IQ returns a binary(8) value. Unlike Sybase IQ, Adaptive Server Anywhere returns a varchar(8). If conversion fails, Sybase IQ returns an error unless CONVERSION_ERROR is OFF. In that case the result is NULL.