Urgent!!! Zip code Look Up

R

robpiolink

I have 2 tables. Table1 has Zip Codes from many cities, also table1 has
a field(yes/no) that says "houston". Table2 has zip codes from houston
city. I want to be able tu run table2 against table1 to compare
zipcodes and if table1 has a zipcode that match table2, i want to
update the field(yes/no).
Any macros or queries???

Thank you
 
J

John Spencer

UPDATE Table1
SET Houston = True
WHERE Table1.ZIP in
(SELECT Table2.Zip FROM Table2)

OR

UPDATE TABLE1 INNER JOIN Table2
On Table1.Zip = Table2.Zip
SET Houston = True
 

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