Access Key violation

I have too tables: tblFinal and tblRaw in Access, and want to update tblFinal with the newer (not necessary better) data in tblRaw.

In the tblRaw, I have: (1) some new records which I definitely want them to go into tblFinal; (2) some old records (already exist in tblFinal) which I want either to update or ignore, depending on my judegment.

If I use SQL:

SELECT tblRaw.* INTO tblFInal FROM tblRaw

Access will give a warning message: " ... n records cann't be appended because of key violation ....".

My question is: Is there an easy way to get a subset of these n violation rescords? With such a subset, I will be able to delete those records I want to ingore and update tblFinal with all of rest.

In general, I am looking for a way to get the set of violation records whenever Access gives a warning message of "key violation", instead of just knowing the number of records causing the violation.


Many thanks in advance.

所有跟帖: 

What keys do you have in each table? -westmont- 給 westmont 發送悄悄話 (209 bytes) () 09/14/2007 postreply 05:14:01

Problem solved. Thanks a lot. -Small_Potato- 給 Small_Potato 發送悄悄話 (0 bytes) () 09/14/2007 postreply 07:36:25

請您先登陸,再發跟帖!