Alphabetical list of functions
344
LENGTH function [String]
Returns the number of characters in the specified string.
LENGTH (
string-expression
)
string-expression The string.
The following statement returns the value 9.
SELECT LENGTH( ’chocolate’ )
If the string contains multi-byte characters, and the proper collation is being
used, LENGTH returns the number of characters, not the number of bytes. If
string is of BINARY data type, the LENGTH function behaves as
BYTE_LENGTH.
♦
SQL/92 Vendor extension.
♦
Sybase Not supported by Adaptive Server Enterprise.
"BYTE_LENGTH function" on page 316
"International Languages and Character Sets" on page 287 of the book ASA
User’s Guide
LIST function [Aggregate]
Returns a comma-separated list of values
LIST ( {
string-expression
| DISTINCT
column-name
} [ ,
delimiter-string
] )
string-expression A string, usually a column name. For each row, the
expression’s value is added to the comma-separated result.
DISTINCT column-name The name of a column that you are using in the
query. For each unique value of that column, the value is added to the
comma-separated result.
delimiter-string This optional argument specifies a delimiter string for the
list items. The default setting is a comma. If a value of NULL, or an empty
string is supplied, there is no delimiter. The delimiter-string should be a
constant.
The following statement returns the value 48 Kennedy Court,54 School
Street.
SELECT LIST( street ) FROM employee
WHERE emp_fname = ’Thomas’
Function
Syntax
Parameters
Examples
Usage
Standards and
compatibility
See also
Function
Syntax
Parameters
Examples