Progress
Report Builder
User’s Guide
REPLACE-INDEXED
Replaces each occurrence of a substring with another string and returns the full string. REPLACE-INDEXED differs from the REPLACE function in that you identify the substring by specifying the start position and length instead of specifying the substring’s contents.
SYNTAX
source-string
The character expression (a constant, field name, or expression that returns a character value) that you want to change. REPLACE-INDEXED does not change the value of the source string; only the return string contains the replacement.
start
The numeric expression representing the starting position of the replacement.
length
The numeric expression representing the number of characters of source-string you want to remove.
replace-string
The character expression (a constant, field name, or expression that returns a character value) that is the replacement expression.
NOTE
The length of replace-string does not have to be the same as length.
EXAMPLETo change four characters of Prod-Code to BB, starting with the third character, create a calculated field containing this expression:
Sample data:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |