Returns the hexadecimal equivalent of a decimal integer.
Parameter |
Description |
---|---|
integer-expression |
The integer to be converted to hexadecimal. |
VARCHAR
The following statement returns the value 3B9ACA00:
SELECT INTTOHEX( 1000000000 ) FROM iq_dummy
SELECT INTTOHEX ( 10000000000) FROM iq_dummy
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.
See Reference: Statements and Options > Database Options > Alphabetical List of Options > CONVERSION_ERROR Option [TSQL].
The database option ASE_FUNCTION_BEHAVIOR specifies that output of Sybase 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.
See Reference: Statements and Options > Database Options > Alphabetical List of Options > ASE_FUNCTION_BEHAVIOR Option.
The output of INTTOHEX is compatible with SQL Anywhere.
Depending on the input, the output of INTTOHEX can be 8 digits or 16 digits and is left padded with zeros; the return data type is VARCHAR.
The output of INTTOHEX does not have a ‘0x’ or ‘0X’ prefix.
The input to INTTOHEX can be up to a 64-bit integer.
The output of INTTOHEX is compatible with Adaptive Server Enterprise.
The output of INTTOHEX is always 8 digits and is left-padded with zeros; the return data type is VARCHAR.
The output of INTTOHEX does not have a ‘0x’ or ‘0X’ prefix.
SELECT INTTOHEX( 1000000000 ) FROM iq_dummyreturns the value 3B9ACA00. But the statement:
SELECT INTTOHEX( 10000000000 ) FROM iq_dummyresults in a conversion error.