dbTalk Databases Forums  

can not insert a new row in a table, unique constraint violated.

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss can not insert a new row in a table, unique constraint violated. in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vijaysam
 
Posts: n/a

Default can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:38 AM






Hi ,

I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.

not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.

what is happening here.. what is the solution?

regards

Vijay

Reply With Quote
  #2  
Old   
Robert Klemme
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:44 AM






On 10 Mrz., 16:38, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.

not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.

what is happening here.. what is the solution?
Please post DDL for the table including all constraints, your SQL that
fails and probably Oracle version.

As first wild guess: you have a unique index on that table and try to
insert a duplicate value.

Cheers

robert


Reply With Quote
  #3  
Old   
Robert Klemme
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:44 AM



On 10 Mrz., 16:38, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.

not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.

what is happening here.. what is the solution?
Please post DDL for the table including all constraints, your SQL that
fails and probably Oracle version.

As first wild guess: you have a unique index on that table and try to
insert a duplicate value.

Cheers

robert


Reply With Quote
  #4  
Old   
Robert Klemme
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:44 AM



On 10 Mrz., 16:38, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.

not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.

what is happening here.. what is the solution?
Please post DDL for the table including all constraints, your SQL that
fails and probably Oracle version.

As first wild guess: you have a unique index on that table and try to
insert a duplicate value.

Cheers

robert


Reply With Quote
  #5  
Old   
Robert Klemme
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:44 AM



On 10 Mrz., 16:38, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.

not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.

what is happening here.. what is the solution?
Please post DDL for the table including all constraints, your SQL that
fails and probably Oracle version.

As first wild guess: you have a unique index on that table and try to
insert a duplicate value.

Cheers

robert


Reply With Quote
  #6  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:56 AM



Comments embedded.
On Mar 10, 10:38*am, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
Hi ,

I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.
And you have at the very least a UNIQUE index on that table.

Quote:
not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.
As I said, it's a UNIQUE index.

Quote:
what is happening here.. what is the solution?
You've tried to insert a 'key' value which already exists in the
table. You cannot do that with a unique index in place. This is
covered in the Concepts Guide, which you should be reading.

Quote:
regards

Vijay

David Fitzjarrell


Reply With Quote
  #7  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:56 AM



Comments embedded.
On Mar 10, 10:38*am, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
Hi ,

I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.
And you have at the very least a UNIQUE index on that table.

Quote:
not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.
As I said, it's a UNIQUE index.

Quote:
what is happening here.. what is the solution?
You've tried to insert a 'key' value which already exists in the
table. You cannot do that with a unique index in place. This is
covered in the Concepts Guide, which you should be reading.

Quote:
regards

Vijay

David Fitzjarrell


Reply With Quote
  #8  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:56 AM



Comments embedded.
On Mar 10, 10:38*am, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
Hi ,

I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.
And you have at the very least a UNIQUE index on that table.

Quote:
not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.
As I said, it's a UNIQUE index.

Quote:
what is happening here.. what is the solution?
You've tried to insert a 'key' value which already exists in the
table. You cannot do that with a unique index in place. This is
covered in the Concepts Guide, which you should be reading.

Quote:
regards

Vijay

David Fitzjarrell


Reply With Quote
  #9  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 09:56 AM



Comments embedded.
On Mar 10, 10:38*am, vijaysam <vsamb... (AT) gmail (DOT) com> wrote:
Quote:
Hi ,

I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.
And you have at the very least a UNIQUE index on that table.

Quote:
not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.
As I said, it's a UNIQUE index.

Quote:
what is happening here.. what is the solution?
You've tried to insert a 'key' value which already exists in the
table. You cannot do that with a unique index in place. This is
covered in the Concepts Guide, which you should be reading.

Quote:
regards

Vijay

David Fitzjarrell


Reply With Quote
  #10  
Old   
DA Morgan
 
Posts: n/a

Default Re: can not insert a new row in a table, unique constraint violated. - 03-10-2008 , 11:15 AM



vijaysam wrote:
Quote:
Hi ,

I can not insert a row in a table called duct_connectivity.

when I try to it says.. unique constraint prd.dctconrb `violated.

not I found out there was no conatraint by this name on the table.

but there was a index on the table by this name.

what is happening here.. what is the solution?

regards

Vijay
For help post your version number (3+ decimal places) and the
actual error message not your interpretation of it.

Robert and Fitzjarrell undoubtedly correct but if you can't
sort it out perhaps this will help:

SELECT index_name, index_type
FROM all_indexes
WHERE table_name = 'DCTCONRB';

SELECT constraint_name, constraint_type
FROM all_constraints
WHERE table_name = 'DCTCONRB';
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.