Update Query

  • Thread starter Thread starter Con Giacomini
  • Start date Start date
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?
 
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?
 
Back
Top