Home Forums SQL Server 2005 Administering Get rid of duplicate records in a table using SQL Server 2005 RE: Get rid of duplicate records in a table using SQL Server 2005

  • Hi there,

    Thanks again for the respond. Herewith is my example of a simple syntax below which i tried to use but nothing gets appended.

    Insert into tblModels (Column1,Column2,Column3,Column4,...)

    Select Distinct Column1,Column2,Column3,Column4,....

    From tblReceivedData

    Where Column1 not in( Select Column1 From tblModels where tblModels .Column2= tblReceivedData.Column2)

    Remember clustered index has been set onto both column1 & Column2. I just need to get this work but transaction get rolled back when it reached duplicate value.

    Regards,

    Atang