dajamle Posted March 31, 2005 Posted March 31, 2005 Hi there, I want to create a script that will delete all related data. This is how things look... It's a college library system, for example, each book has two copies, and each copy has two loans. If I need to delete a book, it will create invalid data in the 'loans' and 'copies' tables. Is there anyway I can create a script that will go through copies and then loans to delete all the data. This is probably a simple loop answer, but I'm a newbie, so please forgive me .
aaa Posted March 31, 2005 Posted March 31, 2005 Create relation with checking "When deleting record, delete record from other file"
Vaughan Posted April 1, 2005 Posted April 1, 2005 AAA's suggestion (sorry don't know your name) is probably the simplest and most reliable and secure. Automatic too. An alternative is to use the Go to Related Record script step to "find" the related records, then ran a script in the related file that deleted the found set. I'm always very wary about running a script that deletes the found set of records without warning: better be really sure it's the right found set!
dajamle Posted April 1, 2005 Author Posted April 1, 2005 Thanks for your help guys. Much appreciated.
Recommended Posts
This topic is 7179 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now