Converting an Select Query to an Update

GOVMATE

Registered User.
Local time
Today, 12:26
Joined
Aug 10, 2007
Messages
71
Hello,

I'm having a small problem converting a select query I wrote into an update query. Below is my original select statement:

SELECT Mid([address3],1,InStrRev([address3]," ")-4) AS CITYx, Mid([address3],InStrRev([address3]," ")-2,2) AS STATEx, Mid([address3],InStrRev([address3]," ")+1,10) AS ZIPx, [address3] AS Expr1
FROM Exercise2
Where right([address3],1) <> "E" and address3 is not null;

The above statement basically parses the address field. Now what I need is an update statement that will use the above code. I'm needing to update the empty fields for city, state, and zip from the field address3 which contains all 3 combined.

Thanks,:mad:
 
Use a subquery: Save the query above and use it as input for the table you want to update.
ConfuseD? You won't be after you uploaded a sample database.

HTH:D
 

Users who are viewing this thread

Back
Top Bottom