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

Separate a field into two files when a space is found 1

Status
Not open for further replies.

deswalker

Programmer
Aug 10, 2005
7
US
I'm using Crystal 10. I'm working with many excel files to join with our existing SQL database. The problem is that the name field is mixed (last name first name AND first name last name) I'm looking to match this full name field by name with my last name first name fields. I think I need to look at the excel name field, find a blank and call everything to the left of the blank last name and everything to the right of the blank first name. If I can get help with this, I can match it up with my SQL files.
HELP!!!
 
Yeah, you need to also fire whoever created this process as they have no idea how capture data.

And what does this have to do with Crystal?

You can do all of this within SQL Server or within Excel.

If you want a formula to get the first name as you suggest (which will sometimes be wrong), use:

first name
left({table,name},instr({table.name}," "))-1)

The rest of the names:
mid({table.name,instr({table.name}," ")+1)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top