Results 1 to 5 of 5
  1. #1
    ahmedbasheer is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    8

    update query

    hello
    i have 2 table in data base
    the first tabl1 have 3 columns ([id] as number and [first_Name] as text and [Last_Name] as text)
    but the [Last_Name] column in first tabl1 is null (dont have any data)

    in the second tabl2 have 2 columns ([id] as number [Last_Name] as text )

    i need transfer data in columns [Last_Name] from tabl2 to [Last_Name] in tabl1 where tabl1.id =tabl2.id
    using update query
    i attach example



    thank you for help me
    Attached Files Attached Files

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Do you need to do this? A normal select query joins the two tables on ID would show the info you need.

  3. #3
    ahmedbasheer is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    8
    id ferst_name last_name
    1 ali
    2 ahmed hasan
    3 sali kais
    4 sara
    5 noor omar
    6 mona adnan
    thank you for reply

    no
    i need use update query to transfer data in tabl2 column last_name to tabl1 in column last_name
    where id column in tabl2 = column in tabl1
    like this table
    i need this final result in tabl1 when i started the update query
    without relation ship

    thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    UPDATE tabl1 INNER JOIN tabl2 ON tabl1.id = tabl2.id SET tabl1.last_Name = [tabl2].[last_Name];

    Easily built with the Access query builder.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ahmedbasheer is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2017
    Posts
    8
    thank you very math

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

Similar Threads

  1. Replies: 2
    Last Post: 08-03-2017, 04:58 AM
  2. Replies: 1
    Last Post: 10-27-2016, 12:14 PM
  3. Query Update/Select Query (Wont Update)
    By NickWren in forum Access
    Replies: 1
    Last Post: 03-30-2016, 10:41 AM
  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