Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## PRO_ARR_DESCAPE function

> Removes escape characters from a single element of a character array. `PRO_ARR_DESCAPE` scans the `char_element` looking for the separator character ( ; ) or an escape character ( ~ ). The function removes an escape character when it finds any of these constructs:

> - Escape character followed by a separator character ( ~; ).

> - Escape character followed by another escape character ( ~~ ).

> - Escape character followed by a `NULL` terminator ( ~\0 ).

> Syntax
>     PRO_ARR_DESCAPE( 'char_element' ) ;

> `char_element`

> The character representation of an array element, without any leading or trailing separators. Must be data type `NVARCHAR`, `VARCHAR,` or `CHAR`.

> Examples

> The following example returns the string '`aa;aa`':

>     PRO_ARR_DESCAPE('aa~;aa') ;

> The following example returns the string '`aa~aa`'. There is no change, since another special character does not follow the escape character:

>     PRO_ARR_DESCAPE('aa~aa') ;

> The third example returns the string '`aa~;aa`':

>     PRO_ARR_DESCAPE('aa~;aa') ;

> Note: `char_element` should not be the name of an array column, since the column contains true separators that would be destroyed by this function.

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