Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Primary key violation error

Author  Topic 

K_P
Starting Member

10 Posts

Posted - 2008-04-08 : 16:41:45
Can anyone help me in handling errors I'm trying to update Employee master table, but i get error messege of violating primary-key constraint

nr
SQLTeam MVY

12543 Posts

Posted - 2008-04-08 : 16:48:45
Either you're inserting a duplicate PK in the table or a trigger is doing it for you (perhaps in another table).

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

QAZAFI
Yak Posting Veteran

50 Posts

Posted - 2008-04-08 : 19:26:43
Please check if there is any trigger on update try to disable that trigger and then update the record hope this will help
Go to Top of Page

K_P
Starting Member

10 Posts

Posted - 2008-04-08 : 20:41:49
Thanks guys, that was helpful. I did check the primarykey condition.
Go to Top of Page
   

- Advertisement -