ASE_FUNCTION_BEHAVIOR Option

Specifies that output of Sybase IQ functions, including INTTOHEX and HEXTOINT, is consistent with the output of Adaptive Server Enterprise functions.

Allowed Values

ON, OFF

Default

OFF

Scope

DBA permissions are not required to set this option. Can be set temporary for an individual connection or for the PUBLIC group. Takes effect immediately.

Description

When ASE_BEHAVIOR_FUNCTION is ON, some of the Sybase IQ data type conversion functions, including HEXTOINT and INTTOHEX, return output that is consistent with the output of Adaptive Server Enterprise functions. The differences in the ASE and Sybase IQ output, with respect to formatting and length, exist because ASE primarily uses signed 32-bit as the default and Sybase IQ primarily uses unsigned 64-bit as the default.

Sybase IQ does not provide support for 64-bit integer, as ASE does not have a 64-bit integer data type.

For details on the behavior of the INTTOHEX and HEXTOINT functions, see Reference: Building Blocks, Tables, and Procedures.

Example

In this example, the HEXTOINT function returns a different value based on whether ASE_FUNCTION_BEHAVIOR is ON or OFF.

The HEXTOINT function returns 4294967287 with ASE_FUNCTION_BEHAVIOR OFF:

select hextoint(‘fffffff7’) from iq_dummy

The HEXTOINT function returns -9 with ASE_FUNCTION_BEHAVIOR ON:

select hextoint(‘fffffff7’) from iq_dummy
Related reference
CONVERSION_ERROR Option [TSQL]