An interesting situation :
I was trying to append 1632 records from one table to another (which already had 6822 records in it). No Primary key in the new data table, but two foreign keys in it.
The query is : INSERT INTO SalesRecords SELECT ImportJunAug15.* FROM ImportJunAug15;
The first time I tried, I got 1451 key violations. Having spent time failing to find the problem, I Compacted and Repaired the db (without having changed any of the data) and tried again. Result : 1138 errors. C&R again, then 869 errors. Next time 640, and then after a final C&R it was down to 5, all of which I could trace to invalid foreign keys.
So this might be a useful lesson for others who encounter key violations - keep C&Ring the db !
Of course I would love to know what's going on here - any ideas ?
I was trying to append 1632 records from one table to another (which already had 6822 records in it). No Primary key in the new data table, but two foreign keys in it.
The query is : INSERT INTO SalesRecords SELECT ImportJunAug15.* FROM ImportJunAug15;
The first time I tried, I got 1451 key violations. Having spent time failing to find the problem, I Compacted and Repaired the db (without having changed any of the data) and tried again. Result : 1138 errors. C&R again, then 869 errors. Next time 640, and then after a final C&R it was down to 5, all of which I could trace to invalid foreign keys.
So this might be a useful lesson for others who encounter key violations - keep C&Ring the db !
Of course I would love to know what's going on here - any ideas ?