Progress
SQL-92
Guide and Reference


PRO_ELEMENT Function

Extracts one or more elements from an array column and returns the NVARCHAR or VARCHAR string between the specified positions, including any internal separator characters and any internal escape characters.

SYNTAX

PRO_ELEMENT ( ’array_style_expression’, start_position, end_position ) ; 

array_style_expression

A string of datatype VARCHAR or CHAR, with a semi-colon ( ; ) separating each element of the array.

start_position

The position in the string marking the beginning of the element PRO_ELEMENT is to extract.

end_position

The position in the string marking the end of the element to be extracted.

EXAMPLES

The following example returns the string ’bb’:

PRO_ELEMENT(’aa;bb;cc’, 2, 2) ; 

The next example returns the string ’aa;bb’:

PRO_ELEMENT(’aa;bb;cc’, 1, 2) ; 

The third example returns the string ’aa~;aa’:

PRO_ELEMENT(’aa~;aa;bb;cc’, 1, 1) ; 

NOTES


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095