Solved

Access - Update Two Fields with One SQL Query

Posted on 2009-04-02
2
266 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now