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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete orphaned records

Status
Not open for further replies.

trick66

Vendor
Sep 25, 2001
23
0
0
US
I have a number of tables that all belong to a single database. One of the tables, ROUTNO, is considered the "header" table which has ROUT_NO as an index. The other tables also have ROUT_NO as an index.

What I want to accomplish is to create a command that will delete records from the "minor" tables that has ROUT_NO that DOES NOT exist any longer in the header table. Is this possible and how?

Thanks for any advice anyone can give.

Rick
 
Hi Rick,

Be easier if you had specified VFP Version etc, and whether the index is .idx or .cdx. Probably .idx, but if is .ndx the children must all be in different directories. .cdx (structural) indexes have the same name as the table (.dbf).

Regards,

Mike
 
Sorry for the lack of information. It is VFP 7. But what Mike Lewis gave me worked. You guys are great, thanks again.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top