Help Please - Update Query

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

Guest

How can I update on an address list "Po address" name to read P.O. with out
changing the rest of the address. I just want to change the "Po to read
"P.O."? Any help will be greatly appreciated. Thank you.
 
UPDATE YourTable
SET Address = "P.O. " & MID([Address],4)
WHERE Address Like "PO *"

Assumption:
Addresses to be changed all start with PO and a space

If PO can be buried within the address (Route to PO Box 2132 Westchester)
then it becomes a bit more complex

UPDATE YourTable
SET Address =TRIM( Replace(" " & [Address]," PO "," P. O. "))
WHERE " " & Address Like "* PO *"

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Thank you - you are a life saver!! Have a great day!

John Spencer said:
UPDATE YourTable
SET Address = "P.O. " & MID([Address],4)
WHERE Address Like "PO *"

Assumption:
Addresses to be changed all start with PO and a space

If PO can be buried within the address (Route to PO Box 2132 Westchester)
then it becomes a bit more complex

UPDATE YourTable
SET Address =TRIM( Replace(" " & [Address]," PO "," P. O. "))
WHERE " " & Address Like "* PO *"

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

TotallyConfused said:
How can I update on an address list "Po address" name to read P.O. with
out
changing the rest of the address. I just want to change the "Po to read
"P.O."? Any help will be greatly appreciated. Thank you.
 
Back
Top