View Single Post
  #7  
Old March 19th, 2010, 01:01 PM posted to microsoft.public.access.queries
Nick X
external usenet poster
 
Posts: 66
Default Action Query (Append) didn't add records due to key violations

I created a union query based on the Append To table and the Append From
table and then ran a find duplicates query on field1 and the number of
duplicates matched the number of key violations from the Append query.

"vanderghast" wrote:

Jet consider that two null are not duplicated, but MS SQL Server consider
that they are, as far as indexes are concerned. In other words, Jet will
accept two null under a field with a UNIQUE constraint on it, but MS SQL
Server won't (because it considers that a null duplicates another null).


For info, that is one of the point where Jet is accordingly to the standard
while MS SQL Server is not (and unlikely to ever be, due to historical
behavior).


Vanderghast, Access MVP



"Nick X" Nicknnator (no) @ (spam) aol.123com wrote in message
...
Hi all,
I am using MS Access 2007 as front-end and SQL Server 2005 as back-end.
In
SQL Server I have a PK plus a multi-field index that is unique. I can add
records manually in both Access and SQL, but when I try to run an append
query it throws a key violation error for the records that in field1 are
duplicates but with the addition of field2 in the index are unique. I am
perplexed...

Thanks in advance,
Nick