E2059 Cannot insert duplicate key row in object

The error message is related to a duplicate key violation in a Microsoft SQL Server database.

E2059 - ECE_ForwardedSQLError: Native Error Code: 2601 SQL State: 23000 [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.Demo$Pricebook' with unique index '$9'. The duplicate key value is (1, 1, 0, 1, 1, 1, 1, A0000001, 1.18000, 0.00000000000000000000, , , Dec 23 2024 11:00AM, SKU, A0000001, 10009).

Error Breakdown:

  • E2059 - ECE_ForwardedSQLError: This is a system-specific error code related to forwarded SQL errors.
  • Native Error Code: 2601: This is an SQL Server error code indicating a duplicate key insertion violation.
  • SQL State: 23000: This SQL state corresponds to an integrity constraint violation.

Error Message

  • Cannot insert duplicate key row in object 'dbo.Demo$Pricebook' with unique index '$9'
  • SQL Server is preventing an INSERT operation because it would create a duplicate entry in a table with a unique constraint (index $9).
  • Duplicate Key Value: (1, 1, 0, 1, 1, 1, 1, A0000001, 1.18000, 0.00000000000000000000, , , Dec 23 2024 11:00AM, SKU, A0000001, 10009)
    • This represents the values that are causing the duplication.

The table dbo.Demo$Pricebook has a unique constraint (likely a primary key or a unique index).The insert operation is trying to add a row with the same key values that already exist.The unique index $9 enforces uniqueness on a specific combination of columns, and your new row has the same values as an existing row in that index.

Possible solutions:

  • Check if the Data Already Exists - run a SQL query to find out if the record exists. If this query returns a result, the record already exists, and you need to avoid inserting it again.
  • Check the Unique Constraint : Find out which columns are included in the unique index $9.
  • In any case, you can filter this record out on the Rapidi transfer so you can allow other records to be created and/or updated while you review this particular record.