Returns the hexadecimal equivalent in VARCHAR(16) of a decimal integer.
Returns the value 0000000000000009:
SELECT BIGINTTOHEX(9) FROM iq_dummy
SELECT BIGINTTOHEX (-9) FROM iq_dummy
BIGINTTOHEX accepts an integer expression that evaluates to BIGINT and returns the hexadecimal equivalent. Returned values are left appended with zeros up to a maximum of 16 digits. All types of unscaled integer data types are accepted as integer expressions.
Conversion is done automatically, if required. Constants are truncated, only if the fraction values are zero. A column cannot be truncated, if the column is declared with a positive scale value. If conversion fails, Sybase IQ returns an error unless the CONVERSION_ERROR option is OFF. In that case, the result is NULL.