Append/Refresh Tables

H

Haji

Hi,

I am trying to append records to table using an append
query. However, I only want to add new records and avoid
duplicates. I will probably run this daily. I don't
have a date restrictor so I need to find a way to append
with only new records.

Thanks,

Haji
 
M

Michel Walsh

Hi,


Build an index that does not allow duplication, use DAO to append the
records (like CurrentDb.Execute "INSERT INTO... ") and forget the error
is acceptable?


Otherwise, you can proceed as for a unit prices list update:


UPDATE oldPrices RIGHT JOIN newPrices
ON oldPrices.ItemID = newPrices.ItemID
SET oldPrices.ItemID=newPrices.ItemID,
oldPrices.UnitPrice = newPrices.UnitPrice



which update existing prices and append new one, in just one query (Jet
only).


Hoping it may help,
Vanderghast, Access MVP
 

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