Key Violations in Append Query

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!
 
G

Guest

Yes it is saying you are trying to add a record that has the same data in the
primary key field as already exist.
 
G

Guest

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.
 
G

Guest

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?
 
G

Guest

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
 

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