Update query

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

I am using Access 97 and need to write a query to update
data. I have data in a table called ReportedBy - I have
one field called Name and the data is displayed like this:

Last Name, First Name ex: Smith, Joe

How can I update the data to read - First Name Last Name
ex: Joe Smith

I want to change the order and remove the comma

Thanks!
 
Try something along the lines of
UPDATE YourTable
SET [Name] = Right([Name],InStrRev([Name]," ")-1) & " " &
Left([Name],InStr([Name],",")-1)

I would recommend that you split these two into separate
columns. Then you can combine them and/or sort them any
way you wish.

Hope This helps
Gerald Stanley MCSD
 
Back
Top