RE: Deleting children, grandchildren, etc.

  • From: Michael.Coll-Barth@xxxxxxxxxxxxxxxxxxx
  • To: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 4 Oct 2006 10:29:12 -0400

 
sometimes I have a desire to delete my children...
 
Sorry, it is just one of those days, so thanks for the unintended joke.  And 
sorry, I do not have the code you are looking for.
 
 
 

I need to delete all the children, grandchildren, etc. for a specific company 
id.  The parent table has over 100 children with some of the children having 
more than one foreign key to the parent.  We do not have ON DELETE CASCADE on 
the constraints.  Does anyone have a script that will generate the appropriate 
delete statements in the correct order or a script that will alter the 
constraint so it will have the ON DELETE CASCADE.  This is a test system that I 
need to clear out all rows for this company as soon as possible so they can 
copy it over from production and test a new configuration for the customer 
without changing any of the other test customer data. 
 
Any help would be greatly appreciated.
 
Sandy



The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure.  If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof.  Thank you.

Other related posts: