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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting Text from a field 1

Status
Not open for further replies.

DaBuzz

Programmer
Nov 8, 2002
40
US
I have a legacy FP application that stores data in a non-ideal format. Due to some government reports I need to extract data in their format.

Is there a way to extract from the following "David D" just "David" or from "Mary Ann" just "Mary". I need to extract out just their first name, no "Junior" etc. plus there can be no spaces etc. Since each name is a different length I need to check for the presence of a space and return everything to the left.

Thanks.
 
? left(NameField,at(' ',NameField)-1) will return what you want.


Rob.
 
Rob444,

THANKS !!

I guess the easy ones sometimes bypass us. I have used that in prior programs and forgotten. Thanks for the refresher - it helped greatly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top