Removing information from field

rbtm2006

Registered User.
Local time
Today, 14:26
Joined
Jan 24, 2012
Messages
20
I have several records that have "(stringofinfo)" at the end of the first name. So example: Smith, John (stringofinfo). I need to figure out a way to remove the "(stringofinfo)" so it just reads Smith, John. I really need to use a query to do this as I would really like to do this during the same step as moving data from one table to another.

Any help?
 
Try the Replace() function.
 
Try the Replace() function.

I did in fact try this at length... the problem is that I can not figure out a way for the function to erase all the info between the ().
 
Another thought, as I think I misunderstood. Try

Left(FieldName, InStr(FieldName, "(") - 1)
 
With Paul's code
Code:
Left(FieldName, InStr(FieldName, "(") - 2) 
 
Or
 
Left(FieldName, InStr(FieldName, " (") - 1)
.. just so you get rid of the trailing space.
 

Users who are viewing this thread

Back
Top Bottom