Results 1 to 4 of 4
  1. #1
    rosscortb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    52

    help with update query

    Hello, never done an update query before, can't work out where I am going wrong.
    I want to update the employee table[Team] with the data in Employee2 table[Team] where both ID's match. When I view the query it looks fine but when I run, it's doing it the other way round, updating employee2 with employee data? I did swap it but never worked.Any ideas thanks RossClick image for larger version. 

Name:	screenshot.PNG 
Views:	9 
Size:	32.8 KB 
ID:	38727

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  3. #3
    rosscortb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    52
    Thanks but the mostly just shows updates where your changing the name of a city not referring another table

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    This is a sample from one of my databases. You can adjust with your table and field names.

    Code:
    UPDATE table4 AS A 
    INNER JOIN table5 AS B 
    ON a.SalesCode=B.SalesCode 
    SET a.SalesValue = B.salesvalue;
    Note the UPDATE table4 ----this indicates which of the tables you want to update.

    Your initial post showed Employee2 (not the table you wanted to be updated).
    Post your query sql if you have questions.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-11-2018, 11:44 AM
  2. Replies: 2
    Last Post: 08-03-2017, 04:58 AM
  3. Replies: 1
    Last Post: 10-27-2016, 12:14 PM
  4. Replies: 7
    Last Post: 08-26-2013, 06:05 AM
  5. Replies: 2
    Last Post: 08-30-2012, 07:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums