Home » SQL & PL/SQL » SQL & PL/SQL » Unique constraint error (10.2.0.2.0 ,windows)
Unique constraint error [message #431582] Wed, 18 November 2009 05:50 Go to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Hi all,

when trying to delete a records from the parent table ,im facing this error.

ORA-02292: integrity constraint (DBO.SYS_C00149208) violated - child record
found.

It seems i need to delete dependencies first and then parent data.

How to find the dependencies of this parent data and delete the corresponding data
from child table. Please advice.


Regards,
Balaji
Re: Unique constraint error [message #431583 is a reply to message #431582] Wed, 18 November 2009 05:59 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
There are so many methods...But for those You should read Oracle Documents....
You can refer user_constraints ,user_cons_columns

sriram Smile
Re: Unique constraint error [message #431584 is a reply to message #431582] Wed, 18 November 2009 06:01 Go to previous messageGo to next message
chupalli
Messages: 5
Registered: November 2009
Location: Spain
Junior Member
Hi,

Run this query...

SELECT * FROM ALL_CONS_COLUMNS
WHERE CONSTRAINT_NAME = 'SYS_C00149208'
AND OWNER = 'DBO';

Regards,
Chupalli
Re: Unique constraint error [message #431587 is a reply to message #431584] Wed, 18 November 2009 06:11 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
@ chupalli

for me....

SQL> SELECT * FROM ALL_CONS_COLUMNS
  2  WHERE CONSTRAINT_NAME = 'SYS_C00149208'
  3  AND OWNER = 'DBO';

no rows selected



sriram Smile
Re: Unique constraint error [message #431588 is a reply to message #431582] Wed, 18 November 2009 06:14 Go to previous messageGo to next message
Michel Cadot
Messages: 63807
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
How to find the dependencies of this parent data and delete the corresponding data from child table. Please advice.

Just read your data model specifications.

Regards
Michel
Re: Unique constraint error [message #431589 is a reply to message #431588] Wed, 18 November 2009 06:16 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Michel Cadot wrote on Wed, 18 November 2009 06:14
Quote:
How to find the dependencies of this parent data and delete the corresponding data from child table. Please advice.

Just read your data model specifications.

Regards
Michel



Such a nice reply.... Smile
Re: Unique constraint error [message #431595 is a reply to message #431587] Wed, 18 November 2009 06:48 Go to previous messageGo to next message
pablolee
Messages: 2813
Registered: May 2007
Location: Scotland
Senior Member
ramoradba wrote on Wed, 18 November 2009 12:11
@ chupalli

for me....

SQL> SELECT * FROM ALL_CONS_COLUMNS
  2  WHERE CONSTRAINT_NAME = 'SYS_C00149208'
  3  AND OWNER = 'DBO';

no rows selected



sriram Smile

Not sure what point you're making there sriram. Any chance you could expand?
Re: Unique constraint error [message #431600 is a reply to message #431582] Wed, 18 November 2009 07:50 Go to previous messageGo to next message
joy_division
Messages: 4617
Registered: February 2005
Location: East Coast USA
Senior Member
The title should be changed to "integrity constraint error" as this is not a unique constraint error.
Re: Unique constraint error [message #431605 is a reply to message #431595] Wed, 18 November 2009 08:14 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
@ pablolee

I want hitman(Based on his previous posts) to read the fine manual (Oracle Documents) for his questions...
And My reply for chupalli is "Don`t post the Actual Query".Because
Giving hints is more helpful than giving solution.

Hope i am clear Smile

Sriram

[Updated on: Wed, 18 November 2009 08:15]

Report message to a moderator

Re: Unique constraint error [message #431611 is a reply to message #431605] Wed, 18 November 2009 08:29 Go to previous message
pablolee
Messages: 2813
Registered: May 2007
Location: Scotland
Senior Member
Fair play Sriram but that is really not how it came across. It looked like you were trying to imply that the query that chupalli supplied was incorrect in some way because it returned no results when you ran it. Might be better to explicitly say it next time Wink
Previous Topic: Bind Mismatch Issue
Next Topic: dbms_lock.sleep problems
Goto Forum:
  


Current Time: Wed Sep 28 10:49:41 CDT 2016

Total time taken to generate the page: 0.23237 seconds