Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update or append query? (AXP)

    Hello All,
    I have a table that contains some data. I want to run a query that will go to this table and get any new records based on criteria in the query. The result is that the query should write these new records to the other table. What I don't want to do is to overwrite any existing records in the new table. In other words, once I write a record to the new table, that record should stay. Now if I run the query an hour from now and there are an additional 5 records, all I want to bring in is the 5 new records and leave the rest alone. How do I structure a query to make it do this? Do I use an append query or an update query? Am I making any sense? It's been a long week already!

    Thanks,
    Mark

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update or append query? (AXP)

    Make a new append query based on the select query.
    This should be something like this :

    INSERT INTO tblOtherTable SELECT MySelectQuery.* FROM MySelectQuery

    This suppose all the fields present in the MySelectquery are also present on the tblOtherTable. Otherwise you'll have to specify each field.
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •