Access Key violation

來源: Small_Potato 2007-09-13 11:09:20 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (995 bytes)
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

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”