Solved

Access - Update Two Fields with One SQL Query

Posted on 2009-04-02
2
282 Views
Last Modified: 2012-05-06
I have two Tables A and B. I would like to update the values from 2 fields in B into A. The following works for one field, and I have tried many combinations with no luck.

UPDATE A INNER JOIN B ON (A.Name_L=B.Name_L) AND (A.Name_F=B.Name_F) SET A.[Mtg Date Initial Audit] = B.Mtg;

Your assistance is most appreciated.

Thanks
0
Comment
Question by:tahirih
2 Comments
 
LVL 15

Accepted Solution

by:
MNelson831 earned 500 total points
ID: 24055636
UPDATE A INNER JOIN B ON (A.Name_L=B.Name_L) AND (A.Name_F=B.Name_F) SET A.[Mtg Date Initial Audit] = B.Mtg, a.[otherfieldname] = b.[otherfiledname], a.[thirdfieldname] = b.[thirdfieldname], etc
0
 

Author Closing Comment

by:tahirih
ID: 31566054
Thank you, just what I was looking for. I had used an "AND" operator in between, unsuccessfully.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question