not all data copies

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

My sql statement does not copy all records. Both tables
are identical except the origin table has an autonumbered
primary key. The origin table has 3500 records but the
destination table is missing around 500 records. Any
ideas?

str = "INSERT INTO AAParts SELECT Parts.* FROM Parts;"
db.Execute str
 
Open a query design window and paste the sql into it. Try to run it and you
will be informed of the cause of your errors.
 
Eric said:
My sql statement does not copy all records. Both tables
are identical except the origin table has an autonumbered
primary key. The origin table has 3500 records but the
destination table is missing around 500 records. Any
ideas?

str = "INSERT INTO AAParts SELECT Parts.* FROM Parts;"
db.Execute str


One good reason for records not being copyied is that the
destination table would have some kind of index violation
(unique, non null, ...) if those records were added.
 
Back
Top