Separating Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table, that imported a City, State Zip Field.
Is there a query that can be run to separate all of these in to their own
fields?
 
Not easily.

If every record is is formated similar to:

City Name, State zip
New York, NY 12345

Then you could use:
City: Left([FieldName], instr([FieldName], ",") - 1)

State = Mid([FieldName], instr([FieldName], ",") + 1, 2)

Zip = Mid([FieldName], instrrev([FieldName], " ")+1)

HTH
Dale
 

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

Similar Threads


Back
Top