Yes that query will completely remove all rows that are duplicated.
You don't want that, you want to leave just one of the records but remove the extra's, right.
You can't delete the duplicates manually because SQL Server won't let you.
There are many ways to achieve that.
1) add an auto number column to the table and either
write a query to delete each duplicate that has the highest auto number.
or
delete them manually
Once all duplicates are gone you can remove the new field
2) Create a copy of the table and delete all records from it(the copy).
Then do
-
INSERT INTO TheCopyTable
-
SELECT distinct * from TheOriginalTable
-
Then you could delete TheOriginalTable and rename TheCopyTable
Or
Delete all records in TheOriginalTable and reinsert them from the TheCopyTable and then delete TheCopyTable
-
INSERT INTO TheCopyTable
-
SELECT distinct * from TheOriginalTable
-
-
DELETE FROM TheOriginalTable
-
-
INSERT INTO TheOriginalTable
-
SELECT * from TheCopyTable
-
-
DROP TABLE TheCopyTable
-
3) Similar to 2 but into a temporary table instead of a copy table
Then delete all records from TheOriginalTable and reinsert them back
from the temp table
4).... Use your imagination
5).... There are lots of possibilities
6) It all depends on your particular situation
If this is a one off task then I suggest that Option 2 may be easiest for you.
NOTE
You really should make "Load Id" and "Shipment Id" key fields so that
it will be impossible for users to create duplicate records in the future.