ASE_FUNCTION_BEHAVIOR option

Function

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 the ASE_BEHAVIOR_FUNCTION option 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 when the ASE_FUNCTION_BEHAVIOR option is enabled, see “INTTOHEX function [Data type conversion]” and “HEXTOINT function [Data type conversion]” in Chapter 4, “SQL Functions” in Reference: Building Blocks, Tables, and Procedures.

Example

In this example, the HEXTOINT function returns a different value based on whether the ASE_FUNCTION_BEHAVIOR option 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

See also

“HEXTOINT function [Data type conversion]” and “INTTOHEX function [Data type conversion]” in Chapter 4, “SQL Functions” in Reference: Building Blocks, Tables, and Procedures

“CONVERSION_ERROR option [TSQL]”