Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy formula - I just don't know syntax

Status
Not open for further replies.

RedHeadedStepITChild

IS-IT--Management
May 31, 2007
46
US
I am using Crystal XI - DB2 database.

I am doing a database conversion project, and using Crystal report to export as a CSV for the new database.

The new database has two separate fields for the employee name, where our current database just has one field.

The data in our current database is set up as lastname comma space first name. For example: Doe, John

I am thinking that I need two formulas - one to include everything up to the comma, and the second to include everything after the comma. Should be easy for you pros out there :)
 
I figured it out :)

Stringvar LastName := {Field.Name};

While Instr(LastName,",") > 0 Do
(
LastName := Left(LastName, Instr(LastName,",") -1);
);
LastName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top