• riyaziq (11/25/2014)


    As Lowell pointed out, you are inserting duplicate primary key values into the table which is not permitted.

    You need to add a 'Sort' component in your Data Flow task.Right click and Edit 'Sort' component and specify by checking all the fields that form your primary key. Ensure to check the option that says "Remove duplicates" at the bottom. eg: If your Primary Key is "EmployeeID", select only "EmployeeID" and check the option to remove duplicates. If your PK is a combination of two or more fields like "FirstName" and "LastName", check both and the option to remove duplicates.

    Good Luck !

    Remember that the sort component is a blocking component and will read all data into memory before producing even one single row of output.

    This is a no-go for large data sets.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP