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!

Primary Key Violation Error

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I am trying to insert data from one table to another in SQL Server 7.0, but keep recieving the following error -

Server: Msg 2627, Level 14, State 1, Line 1
Violation of PRIMARY KEY constraint 'PK__VACANCY__5E3FF0B0'. Cannot insert duplicate key in object 'VACANCY'.
The statement has been terminated.

Any ideas?

Thanks for your help!

Jon
 
You are trying to insert a record into the table VACANCY where there is already a record on there with the same primary key.

What could also be happing is that you have duplicate records on the table you are inserting from.

The primary key of each record has to be unique.

Rick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top