Contents Index CSCONVERT function [STRING] DATE function [Date and time]

ASA SQL Reference
  SQL Functions
    Alphabetical list of functions

DATALENGTH function [System]


Function 

Returns the length in bytes of the underlying storage for the result of an expression.

Syntax 

DATALENGTH ( expression )

Parameters 

expression    The expression is usually a column name. If the expression is a string constant, it must be enclosed in quotes.

Usage 

The return values of DATALENGTH are as follows:

Data type DATALENGTH
SMALLINT 2
INTEGER 4
DOUBLE 8
CHAR Length of the data
BINARY Length of the data
Standards and compatibility 
Example 

The following statement returns the value 27, the longest string in the company_name column.

SELECT following MAX( DATALENGTH( company_name ) )
FROM customer

Contents Index CSCONVERT function [STRING] DATE function [Date and time]