Results 1 to 3 of 3
  1. #1
    amanthethi is offline Novice
    Windows 10 Office 365
    Join Date
    Feb 2021
    Posts
    7

    Help needed with a Update Query

    Hi there,

    I have two tables Table1 and Table2, I want to update those x and y in Table 1 with a and b in Table 2, where ID of Table 1 is matching with ID of Table 2 and z in Table 1 is Null.
    Please tell me how to write the expression for this ?. Thanks and Regards.


    ID x y z
    1 5543 534 543
    2 7546 34 54
    3 7645 34 245
    4 234 234
    5 65 456
    6 234 5653


    7 465 653


    ID a b c
    1 7 7
    2 7 7
    3 7 7
    4 7 7
    5 7 7
    6 7 7
    7 7 7

  2. #2
    Welshgasman is offline Expert
    Windows 10 Access 2007
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    686
    I would use the query designer?
    Please, please use # when posting code snippets.
    Cross Posting Etiquette: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?search_query=debug+access+vba



  3. #3
    DrGUI is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Aug 2015
    Location
    Parts Unknown
    Posts
    23
    UPDATE Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID SET Table1.x = [Table2].[a], Table1.y = [Table2].[b]
    WHERE Table1.z Is Null;

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

Similar Threads

  1. Replies: 1
    Last Post: 07-02-2018, 03:51 PM
  2. Replies: 1
    Last Post: 11-23-2014, 02:20 PM
  3. Help needed for SQL string - UPDATE
    By DADAZHU in forum Programming
    Replies: 1
    Last Post: 12-15-2011, 03:36 AM
  4. Help needed With Update Query Setup
    By NewInAccessBusiness in forum Access
    Replies: 18
    Last Post: 06-08-2011, 12:29 AM
  5. Update Query Help Needed
    By Siobhan in forum Queries
    Replies: 5
    Last Post: 04-20-2011, 02:01 PM

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 - Senior Forums