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 2000 Forums
 SQL Server Administration (2000)
 Error Running Stored Procedure

Author  Topic 

rardales
Starting Member

32 Posts

Posted - 2004-12-29 : 13:34:31
I get an error trying to run a stored procedure. Here's the message I get:

(3292 row(s) affected)

Server: Msg 2601, Level 14, State 3, Procedure p_transaction_summary_build, Line 101
Cannot insert duplicate key row in object 'transaction_summary' with unique index 'X765_edit_user_x'.
The statement has been terminated.

Can anyone help me troubleshoot? There's probably an error with the script.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-29 : 13:35:49
Well you've got a unique index on some column or columns and you are trying ot insert a duplicate which isn't allowed by the unique index. So why are you inserting a duplicate when duplicates aren't allowed?

Tara
Go to Top of Page

rardales
Starting Member

32 Posts

Posted - 2004-12-29 : 13:42:18
So how can I get it to work? I just wanted to run it as I was instructed to do so. The script for the stored procedure is huge. I will probably just have our developers look at it.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-29 : 13:43:14
Tell whoever asked you to run it, that you can't since it is a duplicate and duplicates aren't allowed.

Tara
Go to Top of Page
   

- Advertisement -