In creating a database I made a mistake by not linking a couple of related tables. Now there's data in each and when I try and link them (and enforce referential integrity) I get an error message telling me it can't be done because data in the child table is related to records that no longer exist in the parent table.
I need to enforce referential integrity between the two tables so that when customers are deleted from the parent table, the records in the child table are also deleted. But I can't make that change without first cleaning out the orphaned records in the child table.
What's the best way to do this?
(There are 8000+ records in the parent table, 8600 in the child table.)
Thanks,
KerryL
(If more table detail is needed please let me know.)
I need to enforce referential integrity between the two tables so that when customers are deleted from the parent table, the records in the child table are also deleted. But I can't make that change without first cleaning out the orphaned records in the child table.
What's the best way to do this?
(There are 8000+ records in the parent table, 8600 in the child table.)
Thanks,
KerryL
(If more table detail is needed please let me know.)