Progress
Report Builder
User’s Guide


FLIP

Exchanges the data before a specified character with the data following the character. Commonly used to flip last name with first name based on a comma between the two parts of the name.

SYNTAX

FLIP ( string , delimiter ) 

string

A character expression (a constant, field name, or expression that results in a character value) that you want to flip.

delimiter

A character that divides (delimits) units of data. For example, if delimiter is a comma, FLIP eliminates the leading and trailing spaces for the part following the comma and puts a space between the flipped parts. You can include an asterisk (*) before or after the delimiter to return only part of the string. Placing an asterisk before the delimiter returns only the data before the delimiter. Placing an asterisk after the delimiter returns only the data after the delimiter.

EXAMPLE

To flip the data in a Full-name field from last-name, first-name order to first-name last-name order:

FLIP(Full-name, ’,’) 

Sample data:

Full-name                 FLIP(Full-name,’,’)
Winmill, Todd             Todd Winmill
Burleigh, Sheilah         Sheilah Burleigh
Kirkpatrick, Mike         Mike Kirkpatrick
Cameron III, Bill         Bill Cameron III 

To return only the first name of Full-name:

FLIP(Full-name, ’,*’) 

Sample data:

Full-name                 FLIP(Full-name,’,*’)
Winmill, Todd             Todd
Burleigh, Sheilah         Sheilah
Kirkpatrick, Mike         Mike
Cameron III, Bill         Bill 

To return only the last name of Full-name:

FLIP(Full-name, ’*,’) 

Sample data:

Full-name                 FLIP(Full-name,’*,’)
Winmill, Todd             Winmill
Burleigh, Sheilah         Burleigh
Kirkpatrick, Mike         Kirkpatrick
Cameron III, Bill         Cameron III 


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