I have a date base, where 2 tables did not have the relationship edited before data was placed in the tables. I now want to “Enforce Referential Integrity”.
It will not allow me to do it, is there any way around this?
kevsim
If you can't put referential integrity in, it means that there is at least one entry in the many table that isn't present in the one side of the relationship.
The easiest way is to use a quick wizard generated query to find out the missing entry/entries and add them, then put the integrity in.
Another way is to copy the tables to some other name, delete all the data from both, set the integrity and then copy and paste the data back in, or use an Insert query to transfer it over. This will get you everything except the non matching data.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.