SUBSTRING function

Function

The SUBSTRING function returns a variable length character string of the LONG VARCHAR column parameter. If any of the arguments are NULL, SUBSTRING returns NULL.

Syntax

SUBSTRINGlong-varchar-column, start [, length ] )

Parameters

long-varchar-column The name of a LONG VARCHAR column.

start An integer expression indicating the start of the substring. A positive integer starts from the beginning of the string, with the first character at position 1. A negative integer specifies a substring starting from the end of the string, with the final character at position -1.

length An integer expression indicating the character length of the substring. A positive length specifies the number of characters to return, starting at the start position. A negative length specifies the number of characters to return, ending at the start position.