Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ENFORCE REFERENTIAL INTEGRITY 1

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
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.

John
 
jrbarnett, Thanks for the info, after I asked the question, I kept going throught the tables, I finally found the incorrect entry.
kevsim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top