Key Violations in Append Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two databases. One with an incredibly large table and one that I am
trying to create in a more normalized structure. I am trying to use an
append query to copy some of the fields into the new table and I am getting
an error about a key violation. Does it have anything to do with the primary
key? I have a primary key defined in the new table but not in the old one.
I deleted all relationships in the new database to try and delete the primary
key and I wasnt able to.

Any suggestions would be great!!!!!!!!!!

Thanks!
 
Yes it is saying you are trying to add a record that has the same data in the
primary key field as already exist.
 
It can be a primary key, or index with no duplicae
Check the values in the old table which combination of data has no
duplicate, check the field to see what kind of a primary key you need to
create in the new table, mybe you need to add another field or more to the
key in the new table.

If you want all the data in the table, then create a new field in the new
table, autonumber that will replace the key.
 
The main field in my old table - set as the primary key is an autonumber
field. I have the same field set as the primary key in my new table. Does
that make a difference?
 
No, that should be OK, the autonumber in the old table wont allow duplicates.
I would suggest, check all the fields in the new table for
1. Fields with index and no duplicate
2. Fields that doesn't allow null values
 
Back
Top