If Instr({StringField}," "=0 then {StringField} else
Left({StringField},Instr({Stringfield}," "-1)
The first statement is required in case there is only one word in the string. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
Try to convince the owner of the table to separate the first and last names, because using the instr will likely result in some errors as there may be names like:
Father Woody Allen
Dr. Norman Rockwell
Billy Bob Thorton
The first 2 won't get the name at all, the latter will be incomplete.
It's worse for extracting last names, as in:
Billy Bob Thorton III
I developed extensive list correction logic years ago, and it's very complex and requires extensive name reference tables to improve quality.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.