Length Functions (SQL)

Help Contents

Introduction

Length functions typically return the length of a string.

Syntax

primary-function-length ::=
  character-length-function
  | octet-length-function

character-length-function ::=
  { CHAR_LENGTH | CHARACTER_LENGTH } '(' value-expression
  [ USING char-length-units> ] ')'

char-length-units ::=
  CHARACTERS
  | OCTETS

octet-length-function ::=
  OCTET_LENGTH '(' value-expression ')'

Remarks

These Length functions are supported:

FunctionCalculation
CHAR_LENGTH( S )Returns the length of S in characters or octets.
CHARACTER_LENGTH( S )Returns the length of S in characters or octets.
OCTET_LENGTH( S )Returns the length of S in octets.

If the string parameter S is NULL, the above functions return NULL.

If the USING clause is omitted, CHARACTERS is assumed.

Further Information

Value Expressions (SQL)

To learn more about SQL scalar value expressions.

Fernhill SCADA Structured Query Language (SQL)

To learn more about the SQL features in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.