Results 1 to 3 of 3
  1. #1
    khhess is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    11

    criterium coming from another query

    Hi,
    I have two tables, a and b both tables are having a primary key.



    How do I add data records from tableA into tableB if the primary doesnt exist.
    I used the query builder to list all records in tableA without an existing record in tableB.

    But I found no way to the data from query1 to create a query to copy these records in tableB.

    Any idea?

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    If you want to have all the data in B included in A, then if the tables are in similar layout, you could do a UNION query.

    Here is information on UNION queries.

    http://www.techonthenet.com/sql/union.php

    Alan

  3. #3
    khhess is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    11
    Thanks,
    but table B is on a web server with 6000+ records and table A is my computer.
    What I did, I checked by using Dlookup if record exsit, if not I insert the missing record.
    Now I also want to update existing records, but if I update everytime all records, this will take for ever.
    So I thinking to add a timestamp to identify if a record was changed or you know a better solution.

    Thanks

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

Similar Threads

  1. #NAME? Error keeps coming back
    By tharless in forum Access
    Replies: 24
    Last Post: 02-09-2012, 03:10 PM
  2. Replies: 2
    Last Post: 09-01-2010, 09:51 PM
  3. Replies: 2
    Last Post: 04-27-2010, 01:25 PM
  4. Replies: 1
    Last Post: 11-08-2008, 10:40 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