Results 1 to 3 of 3
  1. #1
    clamette
    Guest

    Separate First, Last MI in a table column

    I need to write a query in an Access 97 database that will separate Lname, Fname, MI from one column into three columns. Data in column currently looks as follows: smith, Jane P. and needs to be like this:
    Smith Jane P

    Any help is greatly appreciated.[img]/w3timages/icons/hairy.gif[/img][img]/w3timages/icons/hairy.gif[/img][img]/w3timages/icons/hairy.gif[/img]

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Separate First, Last MI in a table column

    Hi,
    Your simplest method is probably to add 3 new fields to your table, copy the existing column of names into Excel and do a Data-Text to Columns... on it, then paste it back into the new columns in your table.
    Alternatively you can use the InStr function within an update query (after adding the 3 new fields)- e.g. last name could be done with Left([name],InStr([name],",")-1) where [name] is the name of your existing name field.
    Hope that helps - if you need any more help please post again.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    clamette
    Guest

    Re: Separate First, Last MI in a table column

    Thanks Rory! I'll give that a try![img]/w3timages/icons/thinks.gif[/img]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •