You must Sign In to post a response.
  • Category: Microsoft Dynamics

    Duplicate records in lead

    hi all,
    there are 50000 record (lead) there is lot of duplicate records how to remove bulk duplicate records from the CRM database.

    Thanks in Advance,
    Sankar.A
  • #701740
    Hi,

    Try this

    ;WITH DupRecords AS
    (
    SELECT [Date],Shift,SNo,ROW_NUMBER () OVER(PARTITION BY [Date],Shift,SNo ORDER BY [Rank] ASC ) AS [Rank] FROM #Temp
    )
    DELETE FROM DupRecords WHERE [Rank] > 1


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.