July 17, 200916 yr 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
July 17, 200916 yr 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
July 17, 200916 yr Author 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.
Create an account or sign in to comment