ASE_FUNCTION_BEHAVIOR Option

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

Allowed Values

ON, OFF

Default

OFF

Scope

Option can be set at the database (PUBLIC) or user level. When set at the database level, the value becomes the default for any new user, but has no impact on existing users. When set at the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Description

When ASE_BEHAVIOR_FUNCTION is ON, some of the SAP 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 SAP Sybase IQ output, with respect to formatting and length, exist because ASE primarily uses signed 32-bit as the default and SAP Sybase IQ primarily uses unsigned 64-bit as the default.

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

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]