Results 1 to 4 of 4
  1. #1
    BigBig5 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    7

    Question How to Insert data If Table1 <> Table2?

    I am trying have text data insert if table1.lastname and table1.firstname <> table2.lastname and table1.firstname without having to do it manually. Is there a way to do it?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Can try building a Find Unmatched query (there is a wizard for that) and use that as the source for an INSERT SELECT sql action.
    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.

  3. #3
    BigBig5 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    7
    Quote Originally Posted by June7 View Post
    Can try building a Find Unmatched query (there is a wizard for that) and use that as the source for an INSERT SELECT sql action.
    I have an Unmatched query but don't know how to go with INSERT SELECT sql.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Something like:

    INSERT INTO tablename(fieldname1, fieldname2) SELECT fieldname1, fieldname2 FROM queryname;
    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.

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

Similar Threads

  1. copy data from table1 to table2
    By mathanraj76 in forum Programming
    Replies: 13
    Last Post: 06-03-2013, 12:59 AM
  2. TABLE1 VS TABLE2...Are all ID's from Table1 in Table2???
    By smoothlarryhughes in forum Queries
    Replies: 11
    Last Post: 10-26-2012, 11:28 AM
  3. How to copy Table2 columns in to Table1 ?
    By b.saimsc in forum Access
    Replies: 16
    Last Post: 10-13-2012, 06:07 AM
  4. Replies: 8
    Last Post: 07-08-2012, 02:20 PM
  5. Replies: 4
    Last Post: 08-04-2011, 02:57 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