Matt Leach Posted July 17, 2009 Posted July 17, 2009 I have a spreadsheet that i would like to import into my database that contains about 400 records. One of the fields i am importing is the customer's name. My dilema is that in the spreadsheet, the first and last names are in the same field whereas in my database there is a separate field for first name and last name. My database already has several records in it so merging the two fields is not an option. Is there anyway they can be separated on import? Thanks
bcooney Posted July 17, 2009 Posted July 17, 2009 No, they cannot be separated on import. But you could create a tempory field FullName, and then parse the full name into the correct first and last name fields. I'd probably loop thru the found set after import, and use SetField to populate the first and last names. LeftWords ( ) and RightWords ( ) will come in handy, as well. You could also use the Replace command. Here's a demo with a script for each. This entire approach assumes pretty clean Full Names. If you have hyphenated or more than 2 words, you've got more work to do. And...you could just do this in Excel. FullName.fp7.zip
Matt Leach Posted July 17, 2009 Author Posted July 17, 2009 Thanks for the reply. I think im just going to bite the bullet and do it in excel as several of the names are hyphenated and some records have multiple names. Thanks for the reply though, this will come in handy in the future.
Recommended Posts
This topic is 5958 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now