O'Reilly logo

SQL in a Nutshell by Kevin Kline

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sybase Adaptive Server SQL Functions

This section compares the functions provided by Sybase and SQL Server. Table A-3 provides a list of the functions supported by Sybase as well as how those functions differ on SQL Server. Only functions with differences between the two platforms have been listed.

Table A-3. Sybase Adaptive Server-supported functions

Sybase function

SQL Server function

Notes

To retrieve the application name on Sybase, use the following SQL statement:

select program_name

from master..sysprocesses

where spid = @@spid

APP_NAME( )

Returns application name for current session; set by application.

N/A

BINARY_CHECKSUM({* | expression [,...]})

Returns binary checksum for list of expressions or row of a table.

N/A

CAST(expression AS datatype)

Converts a valid SQL Server expression to the specified datatype. On Sybase Adaptive Server Enterprise, use the CONVERT function instead.

CHAR_LENGTH(expression)

N/A

Returns the number of characters in the expression. On SQL Server, the LEN function provides equivalent functionality.

N/A

CHECKSUM({* | expression [,...]})

Returns checksum value (computed over row values or expressions provided).

N/A

CHECKSUM_AGG([ALL | DISTINCT] expression)

Returns checksum of the values in group.

N/A

COALESCE(expression [,...])

Returns the first non-NULL argument from a list of arguments.

COMPARE(char_expression1, char_expression2 [, {collation_name | collation_ID}])

N/A

Returns the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required