Trim and keep

  • Thread starter Thread starter Box 666
  • Start date Start date
B

Box 666

I have a field that is formatted as follows

Brown, John : Consumer Manger Manchester

I want to copy and keep everything to the right of the " : " to a new field.
Could somebody let me know if this is possible if so how?

With thanks

Bob
 
You can use an update query to change the data. Assuming that the name of
the original field is ORIGfield, and the name of the field where you want to
put the information is NEWfield, and both are in TableName:

UPDATE TableName
SET NEWfield=Trim(Mid([ORIGfield], InStr([ORIGfield], " : ")+2)),
ORIGfield=Trim(Left([ORIGfield], InStr([ORIGfield], " : ")));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top