![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi! I am trying to do a simple udpate on a table and I am getting the error: "Cannot insert duplicate key row in object 'UserInfo' with unique index 'UserInfo_Login'.The statement has been terminated." Here is the command I am trying to run --- USE Deve2_SITE update UserInfo set tp_Login=N'DEV2\sam', tp_Email=N'test (AT) test (DOT) com', tp_Title=N'Samson, Sammy' WHERE (tp_Login=N'DEV\sam') |
#3
| |||
| |||
|
|
Hi! I am trying to do a simple udpate on a table and I am getting the error: "Cannot insert duplicate key row in object 'UserInfo' with unique index 'UserInfo_Login'.The statement has been terminated." Here is the command I am trying to run --- USE Deve2_SITE update UserInfo set tp_Login=N'DEV2\sam', tp_Email=N't... (AT) test (DOT) com', tp_Title=N'Samson, Sammy' WHERE (tp_Login=N'DEV\sam') -- Any ideas? |
#4
| |||
| |||
|
|
On Jun 20, 11:51 am, SJ <sjour... (AT) gmail (DOT) com> wrote: Hi! I am trying to do a simple udpate on a table and I am getting the error: "Cannot insert duplicate key row in object 'UserInfo' with unique index 'UserInfo_Login'.The statement has been terminated." Here is the command I am trying to run --- USE Deve2_SITE update UserInfo set tp_Login=N'DEV2\sam', tp_Email=N't... (AT) test (DOT) com', tp_Title=N'Samson, Sammy' WHERE (tp_Login=N'DEV\sam') -- Any ideas? In addition to Roy's advice, do you have triggers on your table? http://sqlserver-tips.blogspot.com/- Hide quoted text - - Show quoted text - |
#5
| |||
| |||
|
|
UserInfo_Login nonclustered, unique located on PRIMARY tp_SiteID, tp_Login, tp_Deleted |
|
On Jun 20, 1:42 pm, Alex Kuznetsov <AK_TIREDOFS... (AT) hotmail (DOT) COM> wrote: On Jun 20, 11:51 am, SJ <sjour... (AT) gmail (DOT) com> wrote: Hi! I am trying to do a simple udpate on a table and I am getting the error: "Cannot insert duplicate key row in object 'UserInfo' with unique index 'UserInfo_Login'.The statement has been terminated." Here is the command I am trying to run --- USE Deve2_SITE update UserInfo set tp_Login=N'DEV2\sam', tp_Email=N't... (AT) test (DOT) com', tp_Title=N'Samson, Sammy' WHERE (tp_Login=N'DEV\sam') -- Any ideas? In addition to Roy's advice, do you have triggers on your table? http://sqlserver-tips.blogspot.com/- Hide quoted text - - Show quoted text - Thanks all. I guess i dont know what an index is. And why an update would matter. This is the result of the EXEC command: UserInfo_FullText nonclustered, unique located on PRIMARY tp_GUID UserInfo_Login nonclustered, unique located on PRIMARY tp_SiteID, tp_Login, tp_Deleted UserInfo_PK clustered, unique, primary key located on PRIMARY tp_SiteID, tp_ID UserInfo_SID nonclustered, unique located on PRIMARY tp_SiteID, tp_SystemID ANy ideas? Why is an update command doing an insert (that is probably a dumb question) |
![]() |
| Thread Tools | |
| Display Modes | |
| |