Linking tables after data import.

  • Thread starter Thread starter Shree
  • Start date Start date
S

Shree

Hello!
I have a rather convoluted situation out here!
I have 2 tables tblFile and tblCase.They are related in a
one to many relationship as one file can have many cases.
I needed to import data into these two tables from another
system. The import wouldnt go through unless I
disconnected the tables. Once I disconnected the tables, I
carried out a delete query on both tables and then
imported fresh data into both tables. On trying to connect
the two tables again in the same way, enforcing the
referential integrity,I get errors. I do not want to join
the two tables without the referential integrity enforced.
the only other way I could do it was to import data into
tblFile and connect it with the empty tblCase and then do
an import on tblCase but then I cant do the import since
tables are connected! Please help! I dont know what to
do.TIA!
Helpless in Accesland,
Shree
 
On trying to connect
the two tables again in the same way, enforcing the
referential integrity,I get errors.

In that case, you must go back through the records to find and correct the
errors. Cases referring to non existent File?-- add a File record. Same
case number in the table more than once?-- remove the duplicates. Etc.

The best way to avoid this is prevention. Don't remove the Ref Integrity
before the import. Clean the import table before importing it: check all
the File references first, de-duplicate it and so on. Make sure all new
File records are added before their Cases.

Hope that helps.


Tim F
 
Thanks for your help!
-----Original Message-----


In that case, you must go back through the records to find and correct the
errors. Cases referring to non existent File?-- add a File record. Same
case number in the table more than once?-- remove the duplicates. Etc.

The best way to avoid this is prevention. Don't remove the Ref Integrity
before the import. Clean the import table before importing it: check all
the File references first, de-duplicate it and so on. Make sure all new
File records are added before their Cases.

Hope that helps.


Tim F
.
 
Back
Top