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
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.
EXAMPLESThe following example returns the string ’bb’:
The next example returns the string ’aa;bb’:
The third example returns the string ’aa~;aa’:
NOTES
- The array_style_expression must be data type NVARCHAR, VARCHAR, or CHAR.
- The returned string does not include the leading separator of the first element, or the trailing separator ( ; ) of the last element.
- Even if you are extracting only one element, the escape characters are included in the result.
- You must invoke PRO_ARR_DESCAPE to remove any escape characters.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |