I added a new field to the table 1 of the name delete to mark the ones that are duplicates and that are marked in 1 with the following code, but when you delete them and try to upload them, they still appear duplicates
select count(*) from tabla1 where borrar is not null
update tabla1 set borrar = 1
from tabla2 t
inner join tabbla 1 tt on t.id_tipo_identificacion = tt.id_tipo_identificacion and t.nro_identificacion = tt.nro_identificacion
the third table does not support duplicates per PK