Update Query

C

Con Giacomini

A table has Nw, Ne, Sw, Se as part of the address field. Is there a way to
convert these to NW, NE, SW, SE?
 
J

John Spencer (MVP)

WHOOPS, forgot that wildcard needs the two characters in alpha order


UPDATE Table
SET Address = Left(Address,Len(Address)-2) & UCase(Right(Address,2))
WHERE Address Like "* [NS][EW])

John Spencer (MVP) said:
Yes, but the method to use depends. Where in the field do they appear?

For instance are they always the last characters in the field? Assuming that
they are the last characters and are always preceded by a least one space - TRY
the following on a COPY of your table. If it works, then do it on the table.

UPDATE Table
SET Address = Left(Address,Len(Address)-2) & UCase(Right(Address,2))
WHERE Address Like "* [NS][WE])

Con said:
A table has Nw, Ne, Sw, Se as part of the address field. Is there a way to
convert these to NW, NE, SW, SE?
 

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

Top