Appending a linked file

A

Ann

I have created a linked table to a txt file on my network
and I want to create an append query to put the records
into an existing table. Is there any way to have it
check and only append records that are not there?

Ann
 
J

John Nurick

Hi Ann,

If your existing table has a primary key (or other unique index to
prevent duplicate records being created, you can just use a straight
append query. The records that are "not there" will be appended, and the
others will just produce a key violation error which you can ignore.

If that idea offends you, put a criterion in your Append query so it
only selects the records that do not already exist in your table. If
there's a single-field primary key the criterion will be something like

NOT IN (SELECT KeyField FROM MyTable)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top