primary key violation using DTS export wizard

  • Hello everyone,

    I am trying to export a table from one databse to another on the same server.

    the error says that there is a primary key violation and cannot copy data table.

    "violation PRIMARY KEY constraint cx_CD_Table" cannot copy table.

    can someone please let me know what should i do?

    Thank you,

    Sathya.

  • The problem is that your target table has a primary key which enforces uniqueness across a certain set of one or more columns. You can do a few things depending on your situation:

    1. Drop the primary key constraint on the target table.

    2. Filter some of the records from the source so that you're only obtaining distinct values for the primary key columns.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply