Hi @Baker-9022 ,
If the table have duplicate records, you may use TSQL code to delete it via Execute SQL Task.
DELETE
FROM MyDuplicateTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyDuplicateTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)
Or with this
delete x from (
select *, rn=row_number() over (partition by [name] order by id)
from [0422]
) x
where rn > 1;
Regards,
Zoe
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.