23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PRO_ARR_ESCAPE function<br />

Syntax<br />

Adds required escape characters to a single element of a character array.<br />

PRO_ARR_ESCAPE function<br />

PRO_ARR_ESCAPE scans the char_element looking for the separator character ( ; ) or an escape<br />

character ( ~ ). The function inserts an additional escape character when it finds any of these<br />

constructs:<br />

• Escape character followed by a separator character ( ~; )<br />

• Escape character followed by another escape character ( ~~ )<br />

• Escape character followed by a NULL terminator ( ~\0 )<br />

char_element<br />

The character representation of an array element, without any leading or trailing<br />

separators. Must be data type NVARCHAR, or VARCHAR, or CHAR.<br />

Examples The following example returns the string 'aa~;aa':<br />

The following example returns the string 'aa~aa'. There is no change, since another special<br />

character does not follow the escape character:<br />

This example returns the string 'aa~~;aa':<br />

Notes • char_element must be data type NVARCHAR, VARCHAR, or CHAR.<br />

PRO_ELEMENT function<br />

PRO_ARR_ESCAPE( 'char_element' ) ;<br />

PRO_ARR_ESCAPE('aa;aa') ;<br />

PRO_ARR_ESCAPE('aa~aa') ;<br />

PRO_ARR_ESCAPE(’aa~;aa’) ;<br />

• char_element must not be the name of an array column, since the column contains true<br />

separators that would be destroyed by this function.<br />

Extracts one or more elements from an array column and returns the NVARCHAR or VARCHAR string<br />

between the specified positions, including any internal separator characters and any internal<br />

escape characters.<br />

115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!