Complex Update Queries

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I have two large databases, contacts (~300 records) and master (~2500
records). Both databases have a column SSN and rank amoung about 30
other columns. What I need to do copy the rank from master to contacts
where the SSN is the same.

UPDATE contacts
SET contacts.rank = master.rank
FROM contacts, master
WHERE contacts.SSN = master.SSN;

Now Access 2003 gives me errors say I cant have FROM in the query. I
am about to just copy and paste the 300 values manually since I cant
get this to work. Any guidance as to how or if such a query can be
done would be great. Thank you, Jon

PS I also tried this to no avail;
UPDATE contacts
SET rank = (SELECT master.rank FROM master WHERE master.SSN =
contacts.SSN);
 
Try

UPDATE contacts INNER JOIN master
ON contacts.rank = master.rank
SET contacts.rank = master.rank
 

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

Similar Threads

Problem with find button code 9
Crosstab Query 13
SQL Query in Access 2003 9
Access Updating inventory levels 0
Update Query 5
Need Help Please 5
VBA: How can I use a string variable as autofilter criteria? 4
Query Totals 3

Back
Top