Re: Delete child-parent records???????

From: Divya <traineensp_at_softcell.co.in>
Date: 24 Jun 2003 04:17:37 -0700
Message-ID: <c343a42.0306240317.3a15c354_at_posting.google.com>


Hi Mark,
Thanks for your reply....

I am trying to use the cascading command as under: - alter table commercial_details
disable NOT NULL (commercial_details_id) CASCADE;

But this is giving an error as i guess it is syntax wise wrong...So...if i want to delete commercial_details_id which lies in the parent table commercial_details as well as referenced ad a foreign key in delivery_details how do i go about using CASCADE? Tried refering a few sites but havent got it right tho'....

I was told by few others that "Every delivery is associated with a commercial order ie in database there is reference to an commercial order id . Unless you delete that commercial order you cannot delete this delivery item you can only Edit it."

Thanks and regards,
Divya
Mark.Powell_at_eds.com (Mark D Powell) wrote in message news:<2687bb95.0306230523.dc251d5_at_posting.google.com>...
> traineensp_at_softcell.co.in (Divya) wrote in message news:<c343a42.0306222019.6cd519c9_at_posting.google.com>...
> > Hi,
> >
> > I am using Oracle 8.1.4.x and have few records already stored in few
> > tables that share the referential integrity property....
> >
> > Now there is some major error in the frontend display for which i
> > want to redo the entire display for which i need to first delete those
> > records....But i am unable to delete hem freom either of those
> > tables...I get the error message: -
> >
> > Error at Line 1:
> > ORA 02292: integrity constraint (NSPAPP.sys_C006184)violated -
> > child record found.
> >
> > Pls help me out...
> > If i have emailed at the wrong zone pls guide me to the oracle newbie
> > groups also then....
> > Thanks in advance,
> >
> > Divya
>
> Disable the constraint, delete the rows, reenable the constraint.
>
> See the SQL manual for ALTER TABLE to see how to enable and disable
> constraints. I would recommend you consider dropping and recreating
> the constraints giving them names you choose rather than system
> generated names as above.
>
> You can query dba_constraints to see all constraints defined against a
> table. Foreign keys have a constraint_type of 'R'.
>
> HTH -- Mark D Powell --
Received on Tue Jun 24 2003 - 13:17:37 CEST

Original text of this message