11/20/2007

Deleting duplicate records

The other day I wanted to delete multiple records from a table so here is the script that seem to finally work for me:

delete from Record
where RecordID in
( select test_outer.RecordID
from Record as test_outer
where exists( select *
from Record as test_inner
where test_inner.RecordID = test_outer.RecordID
group by RecordID
having count(*) > 1
and min(test_inner.RecordID) <> test_outer.RecordID
)
);

Useful netsh commands

To see blocked ports on your system:  netsh interface ipv4 show excludedportrange protocol=tcp For more info visit: https://ardalis.com/atte...