Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Query Problem

Status
Not open for further replies.

perrydaniel

Technical User
Apr 27, 2004
56
IE
I have two tables and am running a query to append the results of a query into new third table, however if I run the query again I dont want to append duplicate records into the new table. Any advise please.
 
2 options really.

1. set up a link from the source and destination tables and specify criteria based on null values in the destination that excludes records already present. set the link to include all records from the source.

2. Ensure your keyed fields don't allow duplicate records. When you run the append it will give you an error and put any duplicates into a "paste errors" table if I'm not mistaken. If you run this via code you can use setwarnings to turn off this error message and delete the paste errors if you like.
 
In option 1 there is a link between the tables already, (PropertyID and RequirementID) could you explain a little more about specifying null values in the destination that exludes records already present (Is there an SQL statement for this) Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top