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

Determine the delete order for related tables using information schema

Status
Not open for further replies.

yeltom

Programmer
Sep 17, 2001
62
US
Hi all, I have a task that I am not sure can be acomplished given the parameters. my boss has asked me to come up with a way to delete records from tables named in a temp table. Many of these tables are related and have foreign keys. We would like to be able to determine the dependency and delete order without using sp_MSdependencies or any other XP's as we will not have admin access (external clients). Can this be done based on the constraints? Also if so, how can I delete records from a parent\child table without the cascading delete to the child. I know this is a heap but and can be done using the results of executing sp_MSdependencies but therin is the riddle. Pleas help if you can
 
Why not invest the time to write and maintain a script to do exactly what you want, on exactly the tables that you want?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top